Sfoglia il codice sorgente

[TESTS]: correction of Zend_Json_ServerTest not to fully introspect PHPUnit classes

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@24321 44c647ce-9c0f-0410-b52a-842ac1e357ba
mikaelkael 14 anni fa
parent
commit
f2c2a4e6ef
1 ha cambiato i file con 10 aggiunte e 3 eliminazioni
  1. 10 3
      tests/Zend/Json/ServerTest.php

+ 10 - 3
tests/Zend/Json/ServerTest.php

@@ -83,11 +83,18 @@ class Zend_Json_ServerTest extends PHPUnit_Framework_TestCase
         $this->assertTrue($methods->hasMethod('strtolower'));
     }
 
-    public function testShouldBeAbleToBindCallbackToServer()
+    public function testShouldBeAbleToBindCallback1ToServer()
     {
-        $this->server->addFunction(array($this, 'setUp'));
+        $this->server->addFunction(array('Zend_Json_ServerTest_Foo', 'bar'));
         $methods = $this->server->getFunctions();
-        $this->assertTrue($methods->hasMethod('setUp'));
+        $this->assertTrue($methods->hasMethod('bar'));
+    }
+
+    public function testShouldBeAbleToBindCallback2ToServer()
+    {
+        $this->server->addFunction(array(new Zend_Json_ServerTest_Foo, 'bar'));
+        $methods = $this->server->getFunctions();
+        $this->assertTrue($methods->hasMethod('bar'));
     }
 
     public function testShouldBeAbleToBindClassToServer()