/** * @group ZF-7361 */ public function testHasMethod() { $method = new PHP\PHPMethod(); $method->setName('methodOne'); $codeGenClass = new PHP\PHPClass(); $codeGenClass->setMethod($method); $this->assertTrue($codeGenClass->hasMethod('methodOne')); }
/** * @group ZF-7205 */ public function testMethodCanHaveDocblock() { $codeGenProperty = new PHP\PHPMethod(array('name' => 'someFoo', 'static' => true, 'visibility' => 'protected', 'docblock' => '@var string $someVal This is some val')); $expected = <<<EOS /** * @var string \$someVal This is some val */ protected static function someFoo() { } EOS; $this->assertEquals($expected, $codeGenProperty->generate()); }