diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2007-02-08 20:04:26 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2007-02-08 20:04:26 +0000 |
commit | 9f579df2646ecb56aeaa4a6e3dd88ad5b530bec3 (patch) | |
tree | 88739e737df1bcfd954b69880d33329736712352 /tests/pie_test.php | |
parent | b8f51740e26dee3f8fdd937dcaac7f0d437fe785 (diff) | |
download | zetacomponents-graph-9f579df2646ecb56aeaa4a6e3dd88ad5b530bec3.zip zetacomponents-graph-9f579df2646ecb56aeaa4a6e3dd88ad5b530bec3.tar.gz |
- Use create_function instead of custom function creation to be able to rerun
the tests
Diffstat (limited to 'tests/pie_test.php')
-rw-r--r-- | tests/pie_test.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/pie_test.php b/tests/pie_test.php index 3cbeb3b..9aa5588 100644 --- a/tests/pie_test.php +++ b/tests/pie_test.php @@ -302,10 +302,6 @@ class ezcGraphPieChartTest extends ezcGraphTestCase public function testPieRenderPieSegmentsWithLabelCallback() { - function labelCallbackFormatFunction( $label, $value, $percent ) { - return 'Callback: ' . $label; - } - $chart = new ezcGraphPieChart(); $chart->data['sample'] = new ezcGraphArrayDataSet( array( 'Mozilla' => 4375, @@ -317,7 +313,11 @@ class ezcGraphPieChartTest extends ezcGraphTestCase $chart->data['sample']->highlight['wget'] = true; - $chart->options->labelCallback = 'labelCallbackFormatFunction'; + $chart->options->labelCallback = + create_function( + '$label, $value, $percent', + "return 'Callback: ' . \$label;" + ); $mockedRenderer = $this->getMock( 'ezcGraphRenderer2d', array( 'drawPieSegment', |