From d6bae028524a0fc548080d7b8ae1d8fa38102248 Mon Sep 17 00:00:00 2001 From: Kore Nordmann Date: Tue, 27 Jun 2006 09:18:13 +0000 Subject: - Applied API change for accessing datasets to be able to distinguish easier between chart elements and datasets # Changes the way datasets are accessed for charts # Old: # $chart->dataset = array( ... ); # New: # $chart['dataset'] = array( ... ); --- tests/palette_test.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'tests/palette_test.php') diff --git a/tests/palette_test.php b/tests/palette_test.php index fab2f97..5ed820f 100644 --- a/tests/palette_test.php +++ b/tests/palette_test.php @@ -289,18 +289,18 @@ class ezcGraphPaletteTest extends ezcTestCase public function testDatasetAutomaticColorization() { $chart = ezcGraph::create( 'Line' ); - $chart->income = array( 2000 => 2345.2, 2456.3, 2567.4 ); - $chart->spending = array( 2000 => 2347.2, 2458.3, 2569.4 ); + $chart['income'] = array( 2000 => 2345.2, 2456.3, 2567.4 ); + $chart['spending'] = array( 2000 => 2347.2, 2458.3, 2569.4 ); $this->assertEquals( ezcGraphColor::fromHex( '#3465A4' ), - $chart->income->color->default, + $chart['income']->color->default, 'Wrong automatic color set.' ); $this->assertEquals( ezcGraphColor::fromHex( '#4E9A06' ), - $chart->spending->color->default, + $chart['spending']->color->default, 'Wrong automatic color set.' ); } @@ -308,8 +308,8 @@ class ezcGraphPaletteTest extends ezcTestCase public function testChartBackground() { $chart = ezcGraph::create( 'Line' ); - $chart->income = array( 2000 => 2345.2, 2456.3, 2567.4 ); - $chart->spending = array( 2000 => 2347.2, 2458.3, 2569.4 ); + $chart['income'] = array( 2000 => 2345.2, 2456.3, 2567.4 ); + $chart['spending'] = array( 2000 => 2347.2, 2458.3, 2569.4 ); $this->assertEquals( ezcGraphColor::fromHex( '#EEEEEC' ), @@ -321,8 +321,8 @@ class ezcGraphPaletteTest extends ezcTestCase public function testChartElementBorder() { $chart = ezcGraph::create( 'Line' ); - $chart->income = array( 2000 => 2345.2, 2456.3, 2567.4 ); - $chart->spending = array( 2000 => 2347.2, 2458.3, 2569.4 ); + $chart['income'] = array( 2000 => 2345.2, 2456.3, 2567.4 ); + $chart['spending'] = array( 2000 => 2347.2, 2458.3, 2569.4 ); $this->assertEquals( ezcGraphColor::fromHex( '#000000FF' ), @@ -334,8 +334,8 @@ class ezcGraphPaletteTest extends ezcTestCase public function testChartElementBorderWidth() { $chart = ezcGraph::create( 'Line' ); - $chart->income = array( 2000 => 2345.2, 2456.3, 2567.4 ); - $chart->spending = array( 2000 => 2347.2, 2458.3, 2569.4 ); + $chart['income'] = array( 2000 => 2345.2, 2456.3, 2567.4 ); + $chart['spending'] = array( 2000 => 2347.2, 2458.3, 2569.4 ); $this->assertEquals( 0, @@ -347,8 +347,8 @@ class ezcGraphPaletteTest extends ezcTestCase public function testChartElementAxisColor() { $chart = ezcGraph::create( 'Line' ); - $chart->income = array( 2000 => 2345.2, 2456.3, 2567.4 ); - $chart->spending = array( 2000 => 2347.2, 2458.3, 2569.4 ); + $chart['income'] = array( 2000 => 2345.2, 2456.3, 2567.4 ); + $chart['spending'] = array( 2000 => 2347.2, 2458.3, 2569.4 ); $this->assertEquals( ezcGraphColor::fromHex( '#2E3436' ), -- cgit v1.1