public function testClass() { $class = new PhpClass(); $class->setName('class-name')->setDescription('this is my class')->setLongDescription('this is my very long class')->setProperty($this->getProperty())->setMethod($this->getMethod())->setConstant($this->getConstant())->generateDocblock(); $this->assertFalse($class->getDocblock()->isEmpty()); $this->assertNotNull($class->getProperty(self::PROP)->getDocblock()); $this->assertNotNull($class->getMethod(self::METHOD)->getDocblock()); $this->assertNotNull($class->getConstant(self::CONSTANT)->getDocblock()); $docblock = $class->getDocblock(); $author = AuthorTag::create()->setName('gossi')->setEmail('*****@*****.**'); $docblock->appendTag($author); $this->assertTrue($docblock->hasTag('author')); $expected = '/** * this is my class * * this is my very long class * * @author gossi <*****@*****.**> */'; $this->assertEquals($expected, $docblock->toString()); }