diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-06-27 09:18:13 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-06-27 09:18:13 +0000 |
commit | d6bae028524a0fc548080d7b8ae1d8fa38102248 (patch) | |
tree | df0afe090b02444f05cc092aa53cd9b433e22c49 /tests/palette_test.php | |
parent | 50e3d65302d7515cee6b2a677d16bc59d4cf4c8a (diff) | |
download | zetacomponents-graph-d6bae028524a0fc548080d7b8ae1d8fa38102248.zip zetacomponents-graph-d6bae028524a0fc548080d7b8ae1d8fa38102248.tar.gz |
- 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( ... );
Diffstat (limited to 'tests/palette_test.php')
-rw-r--r-- | tests/palette_test.php | 24 |
1 files changed, 12 insertions, 12 deletions
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' ), |