logo       

4156 - in trunk/Graph: src/options tests [eZComponents: Trunk]: msg#00331

web.ezcomponents.cvs

Subject: 4156 - in trunk/Graph: src/options tests [eZComponents: Trunk]

Author: Kore Nordmann
Date: 2006-11-30 16:46:51 +0100 (Thu, 30 Nov 2006)
New Revision: 4156

Log:
- Removed initial font path value

Modified:
trunk/Graph/src/options/font.php
trunk/Graph/tests/font_test.php
trunk/Graph/tests/image_map_test.php

Modified: trunk/Graph/src/options/font.php
===================================================================
--- trunk/Graph/src/options/font.php 2006-11-30 15:19:33 UTC (rev 4155)
+++ trunk/Graph/src/options/font.php 2006-11-30 15:46:51 UTC (rev 4156)
@@ -62,7 +62,8 @@
public function __construct( array $options = array() )
{
$this->properties['name'] = 'sans-serif';
- $this->properties['path'] = 'Graph/tests/data/font.ttf';
+// $this->properties['path'] = 'Graph/tests/data/font.ttf';
+ $this->properties['path'] = '';
$this->properties['type'] = ezcGraph::TTF_FONT;

$this->properties['minFontSize'] = 6;

Modified: trunk/Graph/tests/font_test.php
===================================================================
--- trunk/Graph/tests/font_test.php 2006-11-30 15:19:33 UTC (rev 4155)
+++ trunk/Graph/tests/font_test.php 2006-11-30 15:46:51 UTC (rev 4156)
@@ -204,12 +204,27 @@
{
$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(
$file,

Modified: trunk/Graph/tests/image_map_test.php
===================================================================
--- trunk/Graph/tests/image_map_test.php 2006-11-30 15:19:33 UTC (rev
4155)
+++ trunk/Graph/tests/image_map_test.php 2006-11-30 15:46:51 UTC (rev
4156)
@@ -140,6 +140,7 @@

$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) );



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise