summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Bergmann <sb@sebastian-bergmann.de>2006-09-14 09:58:33 +0000
committerSebastian Bergmann <sb@sebastian-bergmann.de>2006-09-14 09:58:33 +0000
commit32b94070bd2bc02d9d937982e2785a6c33854b2b (patch)
treeeb2fc5df366ab34577dcc3d87f22d58d650ac3d6
parent9dbf37fe5bdb18faae066f8ded2fa10c93343b81 (diff)
downloadzetacomponents-graph-32b94070bd2bc02d9d937982e2785a6c33854b2b.zip
zetacomponents-graph-32b94070bd2bc02d9d937982e2785a6c33854b2b.tar.gz
Clean up setUp() and tearDown().
-rw-r--r--tests/axis_centered_renderer_test.php17
-rw-r--r--tests/axis_exact_renderer_test.php19
-rw-r--r--tests/chart_test.php16
-rw-r--r--tests/color_test.php19
-rw-r--r--tests/dataset_average_test.php15
-rw-r--r--tests/dataset_test.php19
-rw-r--r--tests/date_axis_test.php15
-rw-r--r--tests/driver_gd_test.php15
-rw-r--r--tests/driver_svg_test.php15
-rw-r--r--tests/font_test.php17
-rw-r--r--tests/image_map_test.php15
-rw-r--r--tests/labeled_axis_test.php19
-rw-r--r--tests/legend_test.php19
-rw-r--r--tests/line_test.php15
-rw-r--r--tests/matrix_test.php19
-rw-r--r--tests/numeric_axis_test.php19
-rw-r--r--tests/palette_test.php19
-rw-r--r--tests/pie_test.php15
-rw-r--r--tests/polynom_test.php19
-rw-r--r--tests/renderer_2d_test.php18
-rw-r--r--tests/renderer_3d_test.php19
-rw-r--r--tests/text_test.php19
22 files changed, 30 insertions, 352 deletions
diff --git a/tests/axis_centered_renderer_test.php b/tests/axis_centered_renderer_test.php
index d2c1fba..a06389d 100644
--- a/tests/axis_centered_renderer_test.php
+++ b/tests/axis_centered_renderer_test.php
@@ -17,7 +17,6 @@
*/
class ezcGraphAxisCenteredRendererTest extends ezcTestCase
{
-
protected $renderer;
protected $driver;
@@ -27,12 +26,7 @@ class ezcGraphAxisCenteredRendererTest extends ezcTestCase
return new ezcTestSuite( "ezcGraphAxisCenteredRendererTest" );
}
- /**
- * setUp
- *
- * @access public
- */
- public function setUp()
+ protected function setUp()
{
if ( version_compare( phpversion(), '5.1.3', '<' ) )
{
@@ -40,15 +34,6 @@ class ezcGraphAxisCenteredRendererTest extends ezcTestCase
}
}
- /**
- * tearDown
- *
- * @access public
- */
- public function tearDown()
- {
- }
-
public function testRenderAxisGrid()
{
$chart = new ezcGraphLineChart();
diff --git a/tests/axis_exact_renderer_test.php b/tests/axis_exact_renderer_test.php
index a4ade6d..52bc179 100644
--- a/tests/axis_exact_renderer_test.php
+++ b/tests/axis_exact_renderer_test.php
@@ -17,7 +17,6 @@
*/
class ezcGraphAxisExactRendererTest extends ezcTestCase
{
-
protected $renderer;
protected $driver;
@@ -27,28 +26,14 @@ class ezcGraphAxisExactRendererTest extends ezcTestCase
return new ezcTestSuite( "ezcGraphAxisExactRendererTest" );
}
- /**
- * setUp
- *
- * @access public
- */
- public function setUp()
+ protected function setUp()
{
if ( version_compare( phpversion(), '5.1.3', '<' ) )
{
- $this->markTestSkipped( "These tests required atleast PHP 5.1.3" );
+ $this->markTestSkipped( "This test requires PHP 5.1.3 or later." );
}
}
- /**
- * tearDown
- *
- * @access public
- */
- public function tearDown()
- {
- }
-
public function testDetermineCuttingPoint()
{
$aStart = new ezcGraphCoordinate( -1, -5 );
diff --git a/tests/chart_test.php b/tests/chart_test.php
index 4baef53..5001153 100644
--- a/tests/chart_test.php
+++ b/tests/chart_test.php
@@ -30,25 +30,11 @@ class ezcGraphChartTest extends ezcTestCase
return new ezcTestSuite( "ezcGraphChartTest" );
}
- /**
- * setUp
- *
- * @access public
- */
- public function setUp()
+ protected function setUp()
{
$this->basePath = dirname( __FILE__ ) . '/data/';
}
- /**
- * tearDown
- *
- * @access public
- */
- public function tearDown()
- {
- }
-
public function testSetTitle()
{
$pieChart = new ezcGraphPieChart();
diff --git a/tests/color_test.php b/tests/color_test.php
index 491060d..4b23788 100644
--- a/tests/color_test.php
+++ b/tests/color_test.php
@@ -17,30 +17,11 @@
*/
class ezcGraphColorTest extends ezcTestCase
{
-
public static function suite()
{
return new ezcTestSuite( "ezcGraphColorTest" );
}
- /**
- * setUp
- *
- * @access public
- */
- public function setUp()
- {
- }
-
- /**
- * tearDown
- *
- * @access public
- */
- public function tearDown()
- {
- }
-
public function testFactoryColorFromHex()
{
$color = ezcGraphColor::fromHex( '#05172A' );
diff --git a/tests/dataset_average_test.php b/tests/dataset_average_test.php
index d0c05e9..8fbbe48 100644
--- a/tests/dataset_average_test.php
+++ b/tests/dataset_average_test.php
@@ -17,7 +17,6 @@
*/
class ezcGraphDataSetAverageTest extends ezcTestCase
{
-
protected $basePath;
protected $tempDir;
@@ -27,24 +26,14 @@ class ezcGraphDataSetAverageTest extends ezcTestCase
return new ezcTestSuite( "ezcGraphDataSetAverageTest" );
}
- /**
- * setUp
- *
- * @access public
- */
- public function setUp()
+ protected function setUp()
{
static $i = 0;
$this->tempDir = $this->createTempDir( __CLASS__ . sprintf( '_%03d_', ++$i ) ) . '/';
$this->basePath = dirname( __FILE__ ) . '/data/';
}
- /**
- * tearDown
- *
- * @access public
- */
- public function tearDown()
+ protected function tearDown()
{
if( !$this->hasFailed() )
{
diff --git a/tests/dataset_test.php b/tests/dataset_test.php
index edf712f..d518eb7 100644
--- a/tests/dataset_test.php
+++ b/tests/dataset_test.php
@@ -17,30 +17,11 @@
*/
class ezcGraphDataSetTest extends ezcTestCase
{
-
public static function suite()
{
return new ezcTestSuite( "ezcGraphDataSetTest" );
}
- /**
- * setUp
- *
- * @access public
- */
- public function setUp()
- {
- }
-
- /**
- * tearDown
- *
- * @access public
- */
- public function tearDown()
- {
- }
-
public function testCreateDataSetFromArray()
{
$chart = new ezcGraphPieChart();
diff --git a/tests/date_axis_test.php b/tests/date_axis_test.php
index 5d86179..6983e29 100644
--- a/tests/date_axis_test.php
+++ b/tests/date_axis_test.php
@@ -17,7 +17,6 @@
*/
class ezcGraphDateAxisTest extends ezcTestCase
{
-
protected $chart;
public static function suite()
@@ -25,12 +24,7 @@ class ezcGraphDateAxisTest extends ezcTestCase
return new ezcTestSuite( "ezcGraphDateAxisTest" );
}
- /**
- * setUp
- *
- * @access public
- */
- public function setUp()
+ protected function setUp()
{
date_default_timezone_set( 'Europe/Berlin' );
@@ -38,12 +32,7 @@ class ezcGraphDateAxisTest extends ezcTestCase
$this->chart->xAxis = new ezcGraphChartElementDateAxis();
}
- /**
- * tearDown
- *
- * @access public
- */
- public function tearDown()
+ protected function tearDown()
{
unset( $this->chart );
}
diff --git a/tests/driver_gd_test.php b/tests/driver_gd_test.php
index 562668e..45c0382 100644
--- a/tests/driver_gd_test.php
+++ b/tests/driver_gd_test.php
@@ -17,7 +17,6 @@
*/
class ezcGraphGdDriverTest extends ezcImageTestCase
{
-
protected $driver;
protected $tempDir;
@@ -34,12 +33,7 @@ class ezcGraphGdDriverTest extends ezcImageTestCase
return new ezcTestSuite( "ezcGraphGdDriverTest" );
}
- /**
- * setUp
- *
- * @access public
- */
- public function setUp()
+ protected function setUp()
{
if ( !ezcBaseFeatures::hasExtensionSupport( 'gd' ) &&
( ezcBaseFeatures::hasFunction( 'imagefttext' ) || ezcBaseFeatures::hasFunction( 'imagettftext' ) ) )
@@ -58,12 +52,7 @@ class ezcGraphGdDriverTest extends ezcImageTestCase
$this->driver->options->supersampling = 1;
}
- /**
- * tearDown
- *
- * @access public
- */
- public function tearDown()
+ protected function tearDown()
{
unset( $this->driver );
if ( !$this->hasFailed() )
diff --git a/tests/driver_svg_test.php b/tests/driver_svg_test.php
index 4f7df17..cd64e49 100644
--- a/tests/driver_svg_test.php
+++ b/tests/driver_svg_test.php
@@ -17,7 +17,6 @@
*/
class ezcGraphSvgDriverTest extends ezcTestCase
{
-
protected $driver;
protected $tempDir;
@@ -34,12 +33,7 @@ class ezcGraphSvgDriverTest extends ezcTestCase
return new ezcTestSuite( "ezcGraphSvgDriverTest" );
}
- /**
- * setUp
- *
- * @access public
- */
- public function setUp()
+ protected function setUp()
{
static $i = 0;
$this->tempDir = $this->createTempDir( __CLASS__ . sprintf( '_%03d_', ++$i ) ) . '/';
@@ -50,12 +44,7 @@ class ezcGraphSvgDriverTest extends ezcTestCase
$this->driver->options->height = 100;
}
- /**
- * tearDown
- *
- * @access public
- */
- public function tearDown()
+ protected function tearDown()
{
unset( $this->driver );
if ( !$this->hasFailed() )
diff --git a/tests/font_test.php b/tests/font_test.php
index 00a13df..cc7df09 100644
--- a/tests/font_test.php
+++ b/tests/font_test.php
@@ -17,7 +17,6 @@
*/
class ezcGraphFontTest extends ezcTestCase
{
-
protected $basePath;
public static function suite()
@@ -25,25 +24,11 @@ class ezcGraphFontTest extends ezcTestCase
return new ezcTestSuite( "ezcGraphFontTest" );
}
- /**
- * setUp
- *
- * @access public
- */
- public function setUp()
+ protected function setUp()
{
$this->basePath = dirname( __FILE__ ) . '/data/';
}
- /**
- * tearDown
- *
- * @access public
- */
- public function tearDown()
- {
- }
-
public function testSetGeneralFont()
{
$chart = new ezcGraphPieChart();
diff --git a/tests/image_map_test.php b/tests/image_map_test.php
index 4589aa0..7c01d29 100644
--- a/tests/image_map_test.php
+++ b/tests/image_map_test.php
@@ -17,7 +17,6 @@
*/
class ezcGraphImageMapTest extends ezcTestCase
{
-
protected $basePath;
protected $tempDir;
@@ -31,24 +30,14 @@ class ezcGraphImageMapTest extends ezcTestCase
return new ezcTestSuite( "ezcGraphImageMapTest" );
}
- /**
- * setUp
- *
- * @access public
- */
- public function setUp()
+ protected function setUp()
{
static $i = 0;
$this->tempDir = $this->createTempDir( __CLASS__ . sprintf( '_%03d_', ++$i ) ) . '/';
$this->basePath = dirname( __FILE__ ) . '/data/';
}
- /**
- * tearDown
- *
- * @access public
- */
- public function tearDown()
+ protected function tearDown()
{
if ( !$this->hasFailed() )
{
diff --git a/tests/labeled_axis_test.php b/tests/labeled_axis_test.php
index 55a1df1..bc555e2 100644
--- a/tests/labeled_axis_test.php
+++ b/tests/labeled_axis_test.php
@@ -17,30 +17,11 @@
*/
class ezcGraphLabeledAxisTest extends ezcTestCase
{
-
public static function suite()
{
return new ezcTestSuite( "ezcGraphLabeledAxisTest" );
}
- /**
- * setUp
- *
- * @access public
- */
- public function setUp()
- {
- }
-
- /**
- * tearDown
- *
- * @access public
- */
- public function tearDown()
- {
- }
-
public function testFactoryLabeledAxis()
{
$chart = new ezcGraphLineChart();
diff --git a/tests/legend_test.php b/tests/legend_test.php
index a85fde9..17f734e 100644
--- a/tests/legend_test.php
+++ b/tests/legend_test.php
@@ -17,30 +17,11 @@
*/
class ezcGraphLegendTest extends ezcTestCase
{
-
public static function suite()
{
return new ezcTestSuite( "ezcGraphLegendTest" );
}
- /**
- * setUp
- *
- * @access public
- */
- public function setUp()
- {
- }
-
- /**
- * tearDown
- *
- * @access public
- */
- public function tearDown()
- {
- }
-
protected function addSampleData( ezcGraphChart $chart )
{
$chart->data['sampleData'] = array( 'sample 1' => 234, 'sample 2' => 21, 'sample 3' => 324, 'sample 4' => 120, 'sample 5' => 1);
diff --git a/tests/line_test.php b/tests/line_test.php
index a8e8daa..65d3d72 100644
--- a/tests/line_test.php
+++ b/tests/line_test.php
@@ -17,7 +17,6 @@
*/
class ezcGraphLineChartTest extends ezcTestCase
{
-
protected $basePath;
protected $tempDir;
@@ -27,12 +26,7 @@ class ezcGraphLineChartTest extends ezcTestCase
return new ezcTestSuite( "ezcGraphLineChartTest" );
}
- /**
- * setUp
- *
- * @access public
- */
- public function setUp()
+ protected function setUp()
{
static $i = 0;
if ( version_compare( phpversion(), '5.1.3', '<' ) )
@@ -43,12 +37,7 @@ class ezcGraphLineChartTest extends ezcTestCase
$this->basePath = dirname( __FILE__ ) . '/data/';
}
- /**
- * tearDown
- *
- * @access public
- */
- public function tearDown()
+ protected function tearDown()
{
$this->removeTempDir();
}
diff --git a/tests/matrix_test.php b/tests/matrix_test.php
index c44d6ce..1c58a95 100644
--- a/tests/matrix_test.php
+++ b/tests/matrix_test.php
@@ -17,30 +17,11 @@
*/
class ezcGraphMatrixTest extends ezcTestCase
{
-
public static function suite()
{
return new ezcTestSuite( "ezcGraphMatrixTest" );
}
- /**
- * setUp
- *
- * @access public
- */
- public function setUp()
- {
- }
-
- /**
- * tearDown
- *
- * @access public
- */
- public function tearDown()
- {
- }
-
public function testCreateIdentityMatrix()
{
$matrix = new ezcGraphMatrix();
diff --git a/tests/numeric_axis_test.php b/tests/numeric_axis_test.php
index 08ea13b..f73b56f 100644
--- a/tests/numeric_axis_test.php
+++ b/tests/numeric_axis_test.php
@@ -17,30 +17,11 @@
*/
class ezcGraphNumericAxisTest extends ezcTestCase
{
-
public static function suite()
{
return new ezcTestSuite( "ezcGraphNumericAxisTest" );
}
- /**
- * setUp
- *
- * @access public
- */
- public function setUp()
- {
- }
-
- /**
- * tearDown
- *
- * @access public
- */
- public function tearDown()
- {
- }
-
public function testFactoryNumericAxis()
{
$chart = new ezcGraphLineChart();
diff --git a/tests/palette_test.php b/tests/palette_test.php
index c80850e..bb57b0e 100644
--- a/tests/palette_test.php
+++ b/tests/palette_test.php
@@ -17,30 +17,11 @@
*/
class ezcGraphPaletteTest extends ezcTestCase
{
-
public static function suite()
{
return new ezcTestSuite( "ezcGraphPaletteTest" );
}
- /**
- * setUp
- *
- * @access public
- */
- public function setUp()
- {
- }
-
- /**
- * tearDown
- *
- * @access public
- */
- public function tearDown()
- {
- }
-
public function testDefaultPalette()
{
$chart = new ezcGraphLineChart();
diff --git a/tests/pie_test.php b/tests/pie_test.php
index 0095415..6a37631 100644
--- a/tests/pie_test.php
+++ b/tests/pie_test.php
@@ -17,7 +17,6 @@
*/
class ezcGraphPieChartTest extends ezcImageTestCase
{
-
protected $basePath;
protected $tempDir;
@@ -27,12 +26,7 @@ class ezcGraphPieChartTest extends ezcImageTestCase
return new ezcTestSuite( "ezcGraphPieChartTest" );
}
- /**
- * setUp
- *
- * @access public
- */
- public function setUp()
+ protected function setUp()
{
static $i = 0;
if ( version_compare( phpversion(), '5.1.3', '<' ) )
@@ -43,12 +37,7 @@ class ezcGraphPieChartTest extends ezcImageTestCase
$this->basePath = dirname( __FILE__ ) . '/data/';
}
- /**
- * tearDown
- *
- * @access public
- */
- public function tearDown()
+ protected function tearDown()
{
$this->removeTempDir();
}
diff --git a/tests/polynom_test.php b/tests/polynom_test.php
index 82d55a3..10bcbfd 100644
--- a/tests/polynom_test.php
+++ b/tests/polynom_test.php
@@ -17,30 +17,11 @@
*/
class ezcGraphPolynomTest extends ezcTestCase
{
-
public static function suite()
{
return new ezcTestSuite( "ezcGraphPolynomTest" );
}
- /**
- * setUp
- *
- * @access public
- */
- public function setUp()
- {
- }
-
- /**
- * tearDown
- *
- * @access public
- */
- public function tearDown()
- {
- }
-
public function testCreatePolynom()
{
$polynom = new ezcGraphPolynom( array( 2 => 1 ) );
diff --git a/tests/renderer_2d_test.php b/tests/renderer_2d_test.php
index c62c045..ad1e597 100644
--- a/tests/renderer_2d_test.php
+++ b/tests/renderer_2d_test.php
@@ -17,7 +17,6 @@
*/
class ezcGraphRenderer2dTest extends ezcTestCase
{
-
protected $basePath;
protected $tempDir;
@@ -31,18 +30,14 @@ class ezcGraphRenderer2dTest extends ezcTestCase
return new ezcTestSuite( "ezcGraphRenderer2dTest" );
}
- /**
- * setUp
- *
- * @access public
- */
- public function setUp()
+ protected function setUp()
{
static $i = 0;
if ( version_compare( phpversion(), '5.1.3', '<' ) )
{
- $this->markTestSkipped( "These tests required atleast PHP 5.1.3" );
+ $this->markTestSkipped( "This test requires PHP 5.1.3 or later." );
}
+
$this->tempDir = $this->createTempDir( __CLASS__ . sprintf( '_%03d_', ++$i ) ) . '/';
$this->basePath = dirname( __FILE__ ) . '/data/';
@@ -63,12 +58,7 @@ class ezcGraphRenderer2dTest extends ezcTestCase
$this->driver->options->height = 200;
}
- /**
- * tearDown
- *
- * @access public
- */
- public function tearDown()
+ protected function tearDown()
{
if ( !$this->hasFailed() )
{
diff --git a/tests/renderer_3d_test.php b/tests/renderer_3d_test.php
index 0d22d80..a851e03 100644
--- a/tests/renderer_3d_test.php
+++ b/tests/renderer_3d_test.php
@@ -17,7 +17,6 @@
*/
class ezcGraphRenderer3dTest extends ezcImageTestCase
{
-
protected $basePath;
protected $tempDir;
@@ -27,28 +26,20 @@ class ezcGraphRenderer3dTest extends ezcImageTestCase
return new ezcTestSuite( "ezcGraphRenderer3dTest" );
}
- /**
- * setUp
- *
- * @access public
- */
- public function setUp()
+ protected function setUp()
{
static $i = 0;
+
if ( version_compare( phpversion(), '5.1.3', '<' ) )
{
- $this->markTestSkipped( "These tests required atleast PHP 5.1.3" );
+ $this->markTestSkipped( "This test requires PHP 5.1.3 or later." );
}
+
$this->tempDir = $this->createTempDir( __CLASS__ . sprintf( '_%03d_', ++$i ) ) . '/';
$this->basePath = dirname( __FILE__ ) . '/data/';
}
- /**
- * tearDown
- *
- * @access public
- */
- public function tearDown()
+ protected function tearDown()
{
if( !$this->hasFailed() )
{
diff --git a/tests/text_test.php b/tests/text_test.php
index 1e2125c..8ce3a66 100644
--- a/tests/text_test.php
+++ b/tests/text_test.php
@@ -17,34 +17,19 @@
*/
class ezcGraphTextTest extends ezcTestCase
{
-
public static function suite()
{
return new ezcTestSuite( "ezcGraphTextTest" );
}
- /**
- * setUp
- *
- * @access public
- */
- public function setUp()
+ protected function setUp()
{
if ( version_compare( phpversion(), '5.1.3', '<' ) )
{
- $this->markTestSkipped( "These tests required atleast PHP 5.1.3" );
+ $this->markTestSkipped( "This test requires PHP 5.1.3 or later." );
}
}
- /**
- * tearDown
- *
- * @access public
- */
- public function tearDown()
- {
- }
-
public function testRenderTextTop()
{
$chart = new ezcGraphLineChart();
OpenPOWER on IntegriCloud