markTestSkipped( "This test requires PHP 5.1.3 or later." ); } $this->tempDir = $this->createTempDir( __CLASS__ . sprintf( '_%03d_', ++$i ) ) . '/'; $this->basePath = dirname( __FILE__ ) . '/data/'; $this->renderer = new ezcGraphHorizontalRenderer(); $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; } public function tearDown() { $this->driver = null; $this->renderer = null; if ( !$this->hasFailed() ) { $this->removeTempDir(); } } // /* public function testRenderHorizontalStackedBar() { $this->driver ->expects( $this->at( 0 ) ) ->method( 'drawPolygon' ) ->with( $this->equalTo( array( new ezcGraphCoordinate( 200, 75. ), new ezcGraphCoordinate( 200, 75. ), new ezcGraphCoordinate( 200, 165. ), new ezcGraphCoordinate( 200, 165. ), ), 1. ), $this->equalTo( ezcGraphColor::fromHex( '#FF0000' ) ), $this->equalTo( true ) ); $this->driver ->expects( $this->at( 1 ) ) ->method( 'drawPolygon' ) ->with( $this->equalTo( array( new ezcGraphCoordinate( 200, 75. ), new ezcGraphCoordinate( 200, 75. ), new ezcGraphCoordinate( 200, 165. ), new ezcGraphCoordinate( 200, 165. ), ), 1. ), $this->equalTo( ezcGraphColor::fromHex( '#800000' ) ), $this->equalTo( false ) ); $this->renderer->drawHorizontalStackedBar( new ezcGraphBoundings( 0, 0, 400, 200 ), new ezcGraphContext(), ezcGraphColor::fromHex( '#FF0000' ), new ezcGraphCoordinate( .5, .2 ), new ezcGraphCoordinate( .5, .6 ), 100, 0 ); } } ?>