summaryrefslogtreecommitdiffstats
path: root/tests/date_axis_test.php
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-08-14 12:50:28 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-08-14 12:50:28 +0000
commit48155e33dd6901e3966d9b151d837bcbdc8e9968 (patch)
tree04fbae229bbf0a5bbea14d3e4da3f0bd976a4572 /tests/date_axis_test.php
parent21f7809f953a75b9e6214d0549a7f1941e3df7b9 (diff)
downloadzetacomponents-graph-48155e33dd6901e3966d9b151d837bcbdc8e9968.zip
zetacomponents-graph-48155e33dd6901e3966d9b151d837bcbdc8e9968.tar.gz
- Changed datsets to accept instances of ezcGraphDataSet only
- Added bar charts - Globally increase acceptable difference noise for created images in tests
Diffstat (limited to 'tests/date_axis_test.php')
-rw-r--r--tests/date_axis_test.php30
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/date_axis_test.php b/tests/date_axis_test.php
index a78f1cc..4a4be39 100644
--- a/tests/date_axis_test.php
+++ b/tests/date_axis_test.php
@@ -54,7 +54,7 @@ class ezcGraphDateAxisTest extends ezcTestCase
$this->chart->xAxis->endDate = 100;
$this->chart->xAxis->interval = 10;
- $this->chart['some data'] = array( 10 => 12, 37 => 235, 43 => 17, 114 => 39 );
+ $this->chart['some data'] = new ezcGraphArrayDataSet( array( 10 => 12, 37 => 235, 43 => 17, 114 => 39 ) );
$this->chart->render( 500, 200 );
@@ -82,7 +82,7 @@ class ezcGraphDateAxisTest extends ezcTestCase
$this->chart->xAxis->startDate = 0;
$this->chart->xAxis->endDate = 100;
- $this->chart['some data'] = array( 10 => 12, 37 => 235, 43 => 17, 114 => 39 );
+ $this->chart['some data'] = new ezcGraphArrayDataSet( array( 10 => 12, 37 => 235, 43 => 17, 114 => 39 ) );
$this->chart->render( 500, 200 );
@@ -109,7 +109,7 @@ class ezcGraphDateAxisTest extends ezcTestCase
{
$this->chart->xAxis->interval = 10;
- $this->chart['some data'] = array( 10 => 12, 37 => 235, 43 => 17, 114 => 39 );
+ $this->chart['some data'] = new ezcGraphArrayDataSet( array( 10 => 12, 37 => 235, 43 => 17, 114 => 39 ) );
$this->chart->render( 500, 200 );
@@ -134,7 +134,7 @@ class ezcGraphDateAxisTest extends ezcTestCase
public function testAutomagicScalingSingle1()
{
- $this->chart['some data'] = array( 10 => 12, 37 => 235, 43 => 17, 114 => 39 );
+ $this->chart['some data'] = new ezcGraphArrayDataSet( array( 10 => 12, 37 => 235, 43 => 17, 114 => 39 ) );
$this->chart->render( 500, 200 );
$this->assertEquals(
@@ -158,7 +158,7 @@ class ezcGraphDateAxisTest extends ezcTestCase
public function testAutomagicScalingSingle2()
{
- $this->chart['some data'] = array( 30010 => 12, 30037 => 235, 30043 => 17, 30114 => 39 );
+ $this->chart['some data'] = new ezcGraphArrayDataSet( array( 30010 => 12, 30037 => 235, 30043 => 17, 30114 => 39 ) );
$this->chart->render( 500, 200 );
$this->assertEquals(
@@ -182,12 +182,12 @@ class ezcGraphDateAxisTest extends ezcTestCase
public function testAutomagicScalingSingle3()
{
- $this->chart['some data'] = array(
+ $this->chart['some data'] = new ezcGraphArrayDataSet( array(
mktime( 10, 13, 57, 5, 7, 2006 ) => 324,
mktime( 10, 46, 13, 5, 7, 2006 ) => 324,
mktime( 11, 15, 45, 5, 7, 2006 ) => 324,
mktime( 12, 32, 01, 5, 7, 2006 ) => 324,
- );
+ ) );
$this->chart->render( 500, 200 );
$this->assertEquals(
@@ -211,13 +211,13 @@ class ezcGraphDateAxisTest extends ezcTestCase
public function testAutomagicScalingSingle4()
{
- $this->chart['some data'] = array(
+ $this->chart['some data'] = new ezcGraphArrayDataSet( array(
mktime( 10, 13, 57, 5, 7, 2006 ) => 324,
mktime( 17, 46, 13, 5, 7, 2006 ) => 324,
mktime( 11, 15, 45, 5, 8, 2006 ) => 324,
mktime( 20, 32, 1, 5, 8, 2006 ) => 324,
mktime( 8, 43, 19, 5, 9, 2006 ) => 324,
- );
+ ) );
$this->chart->render( 500, 200 );
$this->assertEquals(
@@ -241,12 +241,12 @@ class ezcGraphDateAxisTest extends ezcTestCase
public function testAutomagicScalingSingle5()
{
- $this->chart['some data'] = array(
+ $this->chart['some data'] = new ezcGraphArrayDataSet( array(
mktime( 1, 0, 0, 1, 1, 2001 ) => 324,
mktime( 1, 0, 0, 1, 1, 2002 ) => 324,
mktime( 1, 0, 0, 1, 1, 2003 ) => 324,
mktime( 1, 0, 0, 1, 1, 2004 ) => 324,
- );
+ ) );
$this->chart->render( 500, 200 );
$this->assertEquals(
@@ -270,13 +270,13 @@ class ezcGraphDateAxisTest extends ezcTestCase
public function testPositionLeft()
{
- $this->chart['some data'] = array(
+ $this->chart['some data'] = new ezcGraphArrayDataSet( array(
mktime( 10, 13, 57, 5, 7, 2006 ) => 324,
mktime( 17, 46, 13, 5, 7, 2006 ) => 324,
mktime( 11, 15, 45, 5, 8, 2006 ) => 324,
mktime( 20, 32, 1, 5, 8, 2006 ) => 324,
mktime( 8, 43, 19, 5, 9, 2006 ) => 324,
- );
+ ) );
$this->chart->xAxis->position = ezcGraph::LEFT;
$this->chart->render( 500, 200 );
@@ -311,13 +311,13 @@ class ezcGraphDateAxisTest extends ezcTestCase
public function testPositionRight()
{
- $this->chart['some data'] = array(
+ $this->chart['some data'] = new ezcGraphArrayDataSet( array(
mktime( 10, 13, 57, 5, 7, 2006 ) => 324,
mktime( 17, 46, 13, 5, 7, 2006 ) => 324,
mktime( 11, 15, 45, 5, 8, 2006 ) => 324,
mktime( 20, 32, 1, 5, 8, 2006 ) => 324,
mktime( 8, 43, 19, 5, 9, 2006 ) => 324,
- );
+ ) );
$this->chart->xAxis->position = ezcGraph::RIGHT;
$this->chart->render( 500, 200 );
OpenPOWER on IntegriCloud