예제 #1
0
 public function testGetFunctionsShouldReturnArrayOfDispatchables()
 {
     $this->_server->addFunction('Zend_Amf_Server_testFunction', 'tf')->setClass('Zend_Amf_testclass', 'tc')->setClass('Zend_Amf_testclassPrivate', 'tcp');
     $functions = $this->_server->getFunctions();
     $this->assertTrue(is_array($functions));
     $this->assertTrue(0 < count($functions));
     $namespaces = array('tf', 'tc', 'tcp');
     foreach ($functions as $key => $value) {
         $this->assertTrue(strstr($key, '.') ? true : false, $key);
         $ns = substr($key, 0, strpos($key, '.'));
         $this->assertContains($ns, $namespaces, $key);
         $this->assertTrue($value instanceof \fproject\amf\reflect\AbstractFunctionReflector);
     }
 }