summaryrefslogtreecommitdiffstats
path: root/tests/renderer_2d_test.php
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-09-06 12:45:09 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-09-06 12:45:09 +0000
commita3a7f0b264223ec011b46fd4e0ce2674af7e0087 (patch)
tree345bb747e3c8311795c154f9849bbc30aca8ee0b /tests/renderer_2d_test.php
parentc87432c04b6b68d8a1e210947acb3f260f013707 (diff)
downloadzetacomponents-graph-a3a7f0b264223ec011b46fd4e0ce2674af7e0087.zip
zetacomponents-graph-a3a7f0b264223ec011b46fd4e0ce2674af7e0087.tar.gz
- Implemented feature #10978: Add support for stacked bar charts
Diffstat (limited to 'tests/renderer_2d_test.php')
-rw-r--r--tests/renderer_2d_test.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/renderer_2d_test.php b/tests/renderer_2d_test.php
index aeebf2b..a3ccda2 100644
--- a/tests/renderer_2d_test.php
+++ b/tests/renderer_2d_test.php
@@ -366,6 +366,46 @@ class ezcGraphRenderer2dTest extends ezcGraphTestCase
);
}
+ public function testRenderStackedBar()
+ {
+ $this->driver
+ ->expects( $this->at( 0 ) )
+ ->method( 'drawPolygon' )
+ ->with(
+ $this->equalTo( array(
+ new ezcGraphCoordinate( 155, 40. ),
+ new ezcGraphCoordinate( 155, 120. ),
+ new ezcGraphCoordinate( 245, 120. ),
+ new ezcGraphCoordinate( 245, 40. ),
+ ), 1. ),
+ $this->equalTo( ezcGraphColor::fromHex( '#FF0000' ) ),
+ $this->equalTo( true )
+ );
+ $this->driver
+ ->expects( $this->at( 1 ) )
+ ->method( 'drawPolygon' )
+ ->with(
+ $this->equalTo( array(
+ new ezcGraphCoordinate( 155, 40. ),
+ new ezcGraphCoordinate( 155, 120. ),
+ new ezcGraphCoordinate( 245, 120. ),
+ new ezcGraphCoordinate( 245, 40. ),
+ ), 1. ),
+ $this->equalTo( ezcGraphColor::fromHex( '#800000' ) ),
+ $this->equalTo( false )
+ );
+
+ $this->renderer->drawStackedBar(
+ new ezcGraphBoundings( 0, 0, 400, 200 ),
+ new ezcGraphContext(),
+ ezcGraphColor::fromHex( '#FF0000' ),
+ new ezcGraphCoordinate( .5, .2 ),
+ new ezcGraphCoordinate( .5, .6 ),
+ 100,
+ 0
+ );
+ }
+
public function testRenderDataLine()
{
$this->driver
OpenPOWER on IntegriCloud