diff options
-rw-r--r-- | tests/renderer_2d_test.php | 24 | ||||
-rw-r--r-- | tests/renderer_3d_test.php | 56 |
2 files changed, 48 insertions, 32 deletions
diff --git a/tests/renderer_2d_test.php b/tests/renderer_2d_test.php index e684cfd..2f3f1a9 100644 --- a/tests/renderer_2d_test.php +++ b/tests/renderer_2d_test.php @@ -63,19 +63,21 @@ class ezcGraphRenderer2dTest extends ezcGraphTestCase $this->renderer = new ezcGraphRenderer2d(); - $this->driver = $this->getMock( 'ezcGraphSvgDriver', array( - 'drawPolygon', - 'drawLine', - 'drawTextBox', - 'drawCircleSector', - 'drawCircularArc', - 'drawCircle', - 'drawImage', - ) ); + $this->driver = $this->getMockBuilder( 'ezcGraphSvgDriver' ) + ->enableArgumentCloning() + ->setMethods( array( + 'drawPolygon', + 'drawLine', + 'drawTextBox', + 'drawCircleSector', + 'drawCircularArc', + 'drawCircle', + 'drawImage', + ) )->getMock(); $this->renderer->setDriver( $this->driver ); - $this->driver->options->width = 400; - $this->driver->options->height = 200; + $this->driver->options->width= 400; + $this->driver->options->height= 200; } public function tearDown() diff --git a/tests/renderer_3d_test.php b/tests/renderer_3d_test.php index cf5dcd7..36630a4 100644 --- a/tests/renderer_3d_test.php +++ b/tests/renderer_3d_test.php @@ -69,9 +69,11 @@ class ezcGraphRenderer3dTest extends ezcGraphTestCase public function testRenderBackgroundImage() { - $driver = $this->getMock( 'ezcGraphSvgDriver', array( - 'drawImage', - ) ); + $driver = $this->getMockBuilder( 'ezcGraphSvgDriver' ) + ->enableArgumentCloning() + ->setMethods( array( + 'drawImage', + ) )->getMock(); $driver->options->width = 400; $driver->options->height = 200; @@ -96,9 +98,11 @@ class ezcGraphRenderer3dTest extends ezcGraphTestCase public function testRenderTopLeftBackgroundImage() { - $driver = $this->getMock( 'ezcGraphSvgDriver', array( - 'drawImage', - ) ); + $driver = $this->getMockBuilder( 'ezcGraphSvgDriver' ) + ->enableArgumentCloning() + ->setMethods( array( + 'drawImage', + ) )->getMock(); $driver->options->width = 400; $driver->options->height = 200; @@ -124,9 +128,11 @@ class ezcGraphRenderer3dTest extends ezcGraphTestCase public function testRenderBottomRightBackgroundImage() { - $driver = $this->getMock( 'ezcGraphSvgDriver', array( - 'drawImage', - ) ); + $driver = $this->getMockBuilder( 'ezcGraphSvgDriver' ) + ->enableArgumentCloning() + ->setMethods( array( + 'drawImage', + ) )->getMock(); $driver->options->width = 400; $driver->options->height = 200; @@ -152,9 +158,11 @@ class ezcGraphRenderer3dTest extends ezcGraphTestCase public function testRenderToBigBackgroundImage() { - $driver = $this->getMock( 'ezcGraphSvgDriver', array( - 'drawImage', - ) ); + $driver = $this->getMockBuilder( 'ezcGraphSvgDriver' ) + ->enableArgumentCloning() + ->setMethods( array( + 'drawImage', + ) )->getMock(); $driver->options->width = 400; $driver->options->height = 200; @@ -180,9 +188,11 @@ class ezcGraphRenderer3dTest extends ezcGraphTestCase public function testRenderBackgroundImageRepeatX() { - $driver = $this->getMock( 'ezcGraphSvgDriver', array( - 'drawImage', - ) ); + $driver = $this->getMockBuilder( 'ezcGraphSvgDriver' ) + ->enableArgumentCloning() + ->setMethods( array( + 'drawImage', + ) )->getMock(); $driver->options->width = 400; $driver->options->height = 200; @@ -227,9 +237,11 @@ class ezcGraphRenderer3dTest extends ezcGraphTestCase public function testRenderBackgroundImageRepeatY() { - $driver = $this->getMock( 'ezcGraphSvgDriver', array( - 'drawImage', - ) ); + $driver = $this->getMockBuilder( 'ezcGraphSvgDriver' ) + ->enableArgumentCloning() + ->setMethods( array( + 'drawImage', + ) )->getMock(); $driver->options->width = 400; $driver->options->height = 200; @@ -265,9 +277,11 @@ class ezcGraphRenderer3dTest extends ezcGraphTestCase public function testRenderBackgroundImageRepeatBoth() { - $driver = $this->getMock( 'ezcGraphSvgDriver', array( - 'drawImage', - ) ); + $driver = $this->getMockBuilder( 'ezcGraphSvgDriver' ) + ->enableArgumentCloning() + ->setMethods( array( + 'drawImage', + ) )->getMock(); $driver->options->width = 400; $driver->options->height = 200; |