[200] r401@phpspec (orig r200): padraic.brady | 2008-01-15 14:35:53 -0700

0 views
Skip to first unread message

nor...@domain51.com

unread,
Jan 15, 2008, 4:38:13 PM1/15/08
to phpspec...@googlegroups.com
Revision
200
Author
phpspec
Date
2008-01-15 14:38:13 -0700 (Tue, 15 Jan 2008)

Log Message

 r401@phpspec (orig r200):  padraic.brady | 2008-01-15 14:35:53 -0700
 * Small change to maintain standard callback syntax for static method refs in arrays

Modified Paths

Property Changed

Diff

Property changes:


Name: svk:merge
   - d6e91ea2-e33a-0410-98df-1d493bd67c58:/:199
   + d6e91ea2-e33a-0410-98df-1d493bd67c58:/:200

Modified: branches/zend/specs/ContextZendSpec.php (199 => 200)


--- branches/zend/specs/ContextZendSpec.php	2008-01-15 21:34:14 UTC (rev 199)
+++ branches/zend/specs/ContextZendSpec.php	2008-01-15 21:38:13 UTC (rev 200)
@@ -36,7 +36,7 @@
 
     public function itShouldAllowSettingSetupCallbackFunction()
     {
-        PHPSpec_Context_Zend::setFrontControllerSetupCallback('Bootstrap','prepare');
+        PHPSpec_Context_Zend::setFrontControllerSetupCallback(array('Bootstrap','prepare'));
         $context = new DescribeFooController;
         $context->beforeEach();
         $this->spec(

Modified: branches/zend/src/PHPSpec/Context/Zend.php (199 => 200)


--- branches/zend/src/PHPSpec/Context/Zend.php	2008-01-15 21:34:14 UTC (rev 199)
+++ branches/zend/src/PHPSpec/Context/Zend.php	2008-01-15 21:38:13 UTC (rev 200)
@@ -75,13 +75,9 @@
         $this->_frontController = Zend_Controller_Front::getInstance();
     }
 
-    public static function setFrontControllerSetupCallback($func, $staticMethod = null) 
+    public static function setFrontControllerSetupCallback($callback) 
     {
-        if ($staticMethod !== null) {
-        	self::$_frontControllerSetupCallback = array($func, $staticMethod);
-        	return;
-        }
-        self::$_frontControllerSetupCallback = $func;
+        self::$_frontControllerSetupCallback = $callback;
     }
     
     public static function clearFrontControllerSetupCallback() 
Reply all
Reply to author
Forward
0 new messages