diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-06-06 09:35:37 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-06-06 09:35:37 +0000 |
commit | a1cf00931ec31b6c7c45ecd182b410c6e7cf4781 (patch) | |
tree | bb5edcc8c93bda14813f5aea520ed4ce00349bd6 /tests/labeled_axis_test.php | |
parent | 8e4f782905f165b9834bff2e95d07884c1fa5bd6 (diff) | |
download | zetacomponents-graph-a1cf00931ec31b6c7c45ecd182b410c6e7cf4781.zip zetacomponents-graph-a1cf00931ec31b6c7c45ecd182b410c6e7cf4781.tar.gz |
- Added arrow heads to axis
Diffstat (limited to 'tests/labeled_axis_test.php')
-rw-r--r-- | tests/labeled_axis_test.php | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/labeled_axis_test.php b/tests/labeled_axis_test.php index 09efd5d..c9b632f 100644 --- a/tests/labeled_axis_test.php +++ b/tests/labeled_axis_test.php @@ -377,6 +377,44 @@ class ezcGraphLabeledAxisTest extends ezcTestCase } } + public function testRenderLabeledAxisArrowHead() + { + try + { + $chart = ezcGraph::create( 'Line' ); + $chart->sample = array( 2000 => 1045, 1300, 1012, 1450 ); + $chart->sample->color = '#FF0000'; + $chart->sample2 = array( 2000 => 1270, 1170, 1610, 1370 ); + $chart->sample2->color = '#00FF00'; + + $mockedRenderer = $this->getMock( 'ezcGraphRenderer2D', array( + 'drawPolygon', + ) ); + + // X-Axis + $mockedRenderer + ->expects( $this->at( 0 ) ) + ->method( 'drawPolygon' ) + ->with( + $this->equalTo( array( + new ezcGraphCoordinate( 500, 190 ), + new ezcGraphCoordinate( 490, 185 ), + new ezcGraphCoordinate( 490, 195 ), + ) ), + $this->equalTo( ezcGraphColor::fromHex( '#000000' ) ), + $this->equalTo( true ) + ); + + $chart->renderer = $mockedRenderer; + + $chart->render( 500, 200 ); + } + catch ( Exception $e ) + { + $this->fail( $e->getMessage() ); + } + } + public function testRenderLabeledAxisMajor() { try |