Esempio n. 1
0
 public function testGetPrototypeMethod()
 {
     require_once __DIR__ . '/TestAsset/functions.php';
     $function = new FunctionReflection('ZendTest\\Code\\Reflection\\TestAsset\\function2');
     $prototype = array('namespace' => 'ZendTest\\Code\\Reflection\\TestAsset', 'name' => 'function2', 'return' => 'string', 'arguments' => array('one' => array('type' => 'string', 'required' => true, 'by_ref' => false, 'default' => null), 'two' => array('type' => 'string', 'required' => false, 'by_ref' => false, 'default' => 'two')));
     $this->assertEquals($prototype, $function->getPrototype());
     $this->assertEquals('string function2(string $one, string $two = \'two\')', $function->getPrototype(FunctionReflection::PROTOTYPE_AS_STRING));
 }