diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-07-11 08:49:26 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-07-11 08:49:26 +0000 |
commit | 6f359d97e38932b0da23abb0940f32bf5380c0d8 (patch) | |
tree | bc6221534bf65aa6777245e7f555e943cdd2bbc6 /tests/text_test.php | |
parent | 663493a7224dc7869c6c63d770016f9fd8850e2a (diff) | |
download | zetacomponents-graph-6f359d97e38932b0da23abb0940f32bf5380c0d8.zip zetacomponents-graph-6f359d97e38932b0da23abb0940f32bf5380c0d8.tar.gz |
- Refactored ezcGraphRenderer
# Most test run again, but complete result is still errnous
Diffstat (limited to 'tests/text_test.php')
-rw-r--r-- | tests/text_test.php | 47 |
1 files changed, 9 insertions, 38 deletions
diff --git a/tests/text_test.php b/tests/text_test.php index b2734a2..824b9c9 100644 --- a/tests/text_test.php +++ b/tests/text_test.php @@ -49,31 +49,18 @@ class ezcGraphTextTest extends ezcTestCase $chart->title = 'Title of a chart'; $mockedRenderer = $this->getMock( 'ezcGraphRenderer2D', array( - 'drawTextBox', + 'drawText', ) ); // Y-Axis $mockedRenderer ->expects( $this->at( 0 ) ) - ->method( 'drawTextBox' ) + ->method( 'drawText' ) ->with( - $this->equalTo( new ezcGraphCoordinate( 1, 1 ) ), + $this->equalTo( new ezcGraphBoundings( 1, 1, 499, 21 ) ), $this->equalTo( 'Title of a chart' ), - $this->equalTo( 498 ), - $this->equalTo( 18 ), $this->equalTo( ezcGraph::CENTER | ezcGraph::MIDDLE ) ); - // Test for margin - $mockedRenderer - ->expects( $this->at( 1 ) ) - ->method( 'drawTextBox' ) - ->with( - $this->equalTo( new ezcGraphCoordinate( 17, 22 ) ), - $this->equalTo( 'sample' ), - $this->equalTo( 81 ), - $this->equalTo( 12 ), - $this->equalTo( ezcGraph::LEFT | ezcGraph::MIDDLE ) - ); $chart->renderer = $mockedRenderer; @@ -89,18 +76,16 @@ class ezcGraphTextTest extends ezcTestCase $chart->title->position = ezcGraph::BOTTOM; $mockedRenderer = $this->getMock( 'ezcGraphRenderer2D', array( - 'drawTextBox', + 'drawText', ) ); // Y-Axis $mockedRenderer ->expects( $this->at( 0 ) ) - ->method( 'drawTextBox' ) + ->method( 'drawText' ) ->with( - $this->equalTo( new ezcGraphCoordinate( 1, 181 ) ), + $this->equalTo( new ezcGraphBoundings( 1, 179, 499, 199 ) ), $this->equalTo( 'Title of a chart' ), - $this->equalTo( 498 ), - $this->equalTo( 18 ), $this->equalTo( ezcGraph::CENTER | ezcGraph::MIDDLE ) ); @@ -119,32 +104,18 @@ class ezcGraphTextTest extends ezcTestCase $chart->title->margin = 5; $mockedRenderer = $this->getMock( 'ezcGraphRenderer2D', array( - 'drawTextBox', + 'drawText', ) ); // Y-Axis $mockedRenderer ->expects( $this->at( 0 ) ) - ->method( 'drawTextBox' ) + ->method( 'drawText' ) ->with( - $this->equalTo( new ezcGraphCoordinate( 1, 1 ) ), + $this->equalTo( new ezcGraphBoundings( 6, 6, 494, 25 ) ), $this->equalTo( 'Title of a chart' ), - $this->equalTo( 498 ), - $this->equalTo( 18 ), $this->equalTo( ezcGraph::CENTER | ezcGraph::MIDDLE ) ); - // Test for margin - $mockedRenderer - ->expects( $this->at( 1 ) ) - ->method( 'drawTextBox' ) - ->with( - $this->equalTo( new ezcGraphCoordinate( 17, 27 ) ), - $this->equalTo( 'sample' ), - $this->equalTo( 81 ), - $this->equalTo( 12 ), - $this->equalTo( ezcGraph::LEFT | ezcGraph::MIDDLE ) - ); - $chart->renderer = $mockedRenderer; |