summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-11-30 15:46:51 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-11-30 15:46:51 +0000
commit052165cca269587641656e9c9714343f2f5b3cf7 (patch)
treedce2541676aaa15336fefdf375c47f0c7fc8aa6f /tests
parenta7df5bda8d5f00fee28a288fb078d936787fe524 (diff)
downloadzetacomponents-graph-052165cca269587641656e9c9714343f2f5b3cf7.zip
zetacomponents-graph-052165cca269587641656e9c9714343f2f5b3cf7.tar.gz
- Removed initial font path value
Diffstat (limited to 'tests')
-rw-r--r--tests/font_test.php25
-rw-r--r--tests/image_map_test.php1
2 files changed, 21 insertions, 5 deletions
diff --git a/tests/font_test.php b/tests/font_test.php
index 20e8eb1..460c64d 100644
--- a/tests/font_test.php
+++ b/tests/font_test.php
@@ -204,11 +204,26 @@ class ezcGraphFontTest extends ezcTestCase
{
$options = new ezcGraphFontOptions();
- $this->assertSame(
- dirname( __FILE__ ) . '/data/font.ttf',
- $options->path,
- 'Wrong default value for property path in class ezcGraphFontOptions'
- );
+ try
+ {
+ $catched = false;
+ $options->path;
+ }
+ catch( ezcBaseFileNotFoundException $e )
+ {
+ $catched = true;
+
+ $this->assertEquals(
+ $e->getMessage(),
+ 'The font file \'\' could not be found.',
+ 'Wrong default content mentioned in exception.'
+ );
+ }
+
+ if ( !$catched )
+ {
+ $this->fail( 'Expected ezcBaseFileNotFoundException.' );
+ }
$options->path = $file = dirname( __FILE__ ) . '/data/font2.ttf';
$this->assertSame(
diff --git a/tests/image_map_test.php b/tests/image_map_test.php
index 437613c..92cf5b4 100644
--- a/tests/image_map_test.php
+++ b/tests/image_map_test.php
@@ -140,6 +140,7 @@ class ezcGraphImageMapTest extends ezcTestCase
$chart = new ezcGraphLineChart();
$chart->driver = new ezcGraphGdDriver();
+ $chart->options->font->path = dirname( __FILE__ ) . '/data/font.ttf';
$chart->palette = new ezcGraphPaletteBlack();
$chart->data['sampleData'] = new ezcGraphArrayDataSet( array( 'sample 1' => 234, 'sample 2' => 21, 'sample 3' => 324, 'sample 4' => 120, 'sample 5' => 1) );
OpenPOWER on IntegriCloud