Author: Kore Nordmann
Date: 2007-02-08 21:04:26 +0100 (Thu, 08 Feb 2007)
New Revision: 4641

Log:
- Use create_function instead of custom function creation to be able to rerun 
  the tests

Modified:
   trunk/Graph/tests/pie_test.php

Modified: trunk/Graph/tests/pie_test.php
===================================================================
--- trunk/Graph/tests/pie_test.php      2007-02-08 11:11:42 UTC (rev 4640)
+++ trunk/Graph/tests/pie_test.php      2007-02-08 20:04:26 UTC (rev 4641)
@@ -302,10 +302,6 @@
 
     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 @@
 
         $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',

-- 
svn-components mailing list
svn-components@lists.ez.no
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to