summaryrefslogtreecommitdiffstats
path: root/tests/renderer_3d_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/renderer_3d_test.php')
-rw-r--r--tests/renderer_3d_test.php62
1 files changed, 39 insertions, 23 deletions
diff --git a/tests/renderer_3d_test.php b/tests/renderer_3d_test.php
index 90d22f3..36630a4 100644
--- a/tests/renderer_3d_test.php
+++ b/tests/renderer_3d_test.php
@@ -44,8 +44,10 @@ class ezcGraphRenderer3dTest extends ezcGraphTestCase
return new PHPUnit_Framework_TestSuite( "ezcGraphRenderer3dTest" );
}
- protected function setUp()
+ public function setUp()
{
+ parent::setUp();
+
static $i = 0;
if ( version_compare( phpversion(), '5.1.3', '<' ) )
@@ -57,7 +59,7 @@ class ezcGraphRenderer3dTest extends ezcGraphTestCase
$this->basePath = dirname( __FILE__ ) . '/data/';
}
- protected function tearDown()
+ public function tearDown()
{
if ( !$this->hasFailed() )
{
@@ -67,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;
@@ -94,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;
@@ -122,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;
@@ -150,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;
@@ -178,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;
@@ -225,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;
@@ -263,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