_method = new Zend_CodeGenerator_Php_Method(); } public function teardown() { $this->_method = null; } public function testConstructor() { $codeGenMethod = new Zend_CodeGenerator_Php_Method(); $this->isInstanceOf($codeGenMethod, 'Zend_CodeGenerator_Php_Method'); } public function testParameterAccessors() { $codeGen = new Zend_CodeGenerator_Php_Method(); $codeGen->setParameters(array( array('name' => 'one') )); } public function testBodyGetterAndSetter() { $this->_method->setBody('Foo'); $this->assertEquals('Foo', $this->_method->getBody()); } public function testDocblockGetterAndSetter() { $d = new Zend_CodeGenerator_Php_Docblock(); $this->_method->setDocblock($d); $this->assertTrue($d === $this->_method->getDocblock()); } public function testFromReflection() { $ref = new Zend_Reflection_Method('Zend_Reflection_TestSampleSingleClass', 'someMethod'); $codeGenMethod = Zend_CodeGenerator_Php_Method::fromReflection($ref); $target = <<assertEquals($target, (string) $codeGenMethod); } }