/** * @covers phpDocumentor\Plugin\Core\Transformer\Writer\Xml\DocBlockConverter::convert * @covers phpDocumentor\Plugin\Core\Transformer\Writer\Xml\DocBlockConverter::addTags * @covers phpDocumentor\Plugin\Core\Transformer\Writer\Xml\DocBlockConverter::addInheritedFromTag */ public function testConvertTagsOntoDocBlock() { // Arrange $parent = $this->prepareParentXMLElement(); $tag = m::mock('phpDocumentor\\Descriptor\\TagDescriptor'); $this->tagConverterMock->shouldReceive('convert')->with(m::type('DOMElement'), $tag); $descriptor = $this->givenADescriptorWithSummaryDescriptionAndTags('summary', 'description', array(array($tag))); // Act $this->fixture->convert($parent, $descriptor); // Assert $this->assertTrue(true); }
/** * Tests whether a method name to another element is stored with the tag when such is present. * * @covers phpDocumentor\Plugin\Core\Transformer\Writer\Xml\TagConverter::convert * * @return void */ public function testWhetherMethodNamesAreAddedWhenPresent() { // Arrange $methodName = 'getMethod'; $tagConverter = new TagConverter(); $parent = $this->prepareDocBlockXMLElement(); $tag = $this->createTagDescriptorMock('name', 'description', 'Tag\\MethodDescriptor'); $tag->shouldReceive('getMethodName')->andReturn($methodName); // Act $convertedElement = $tagConverter->convert($parent, $tag); // Assert $this->assertSame($methodName, $convertedElement->getAttribute('method_name')); }