summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKore Nordmann <mail@kore-nordmann.de>2013-12-21 11:53:29 +0100
committerKore Nordmann <mail@kore-nordmann.de>2013-12-21 11:53:29 +0100
commitd2f4a921a9de0b0c93b300e76535f374d206c1e0 (patch)
tree1467b954a3d955e7f5630f9e7ada195ec04ffea6
parent93062e252a16efeaea9c95484232a009a1569a51 (diff)
downloadzetacomponents-graph-d2f4a921a9de0b0c93b300e76535f374d206c1e0.zip
zetacomponents-graph-d2f4a921a9de0b0c93b300e76535f374d206c1e0.tar.gz
Updated to changes in PHPUnit Mock API
-rw-r--r--tests/renderer_2d_test.php24
-rw-r--r--tests/renderer_3d_test.php56
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;
OpenPOWER on IntegriCloud