public function test__construct() { $function = new ReflectionFunction('Zend_Server_Reflection_FunctionTest_function'); $r = new Zend_Server_Reflection_Function($function); $this->assertTrue($r instanceof Zend_Server_Reflection_Function); $this->assertTrue($r instanceof Zend_Server_Reflection_Function_Abstract); $params = $r->getParameters(); try { $r = new Zend_Server_Reflection_Function($params[0]); $this->fail('Should not be able to construct with non-function'); } catch (Exception $e) { // do nothing } $r = new Zend_Server_Reflection_Function($function, 'namespace'); $this->assertEquals('namespace', $r->getNamespace()); $argv = array('string1', 'string2'); $r = new Zend_Server_Reflection_Function($function, 'namespace', $argv); $this->assertTrue(is_array($r->getInvokeArguments())); $this->assertTrue($argv === $r->getInvokeArguments()); $prototypes = $r->getPrototypes(); $this->assertTrue(is_array($prototypes)); $this->assertTrue(0 < count($prototypes)); }