mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
Serializer - add test for tag removal extra spaces
This commit is contained in:
committed by
Jaap van Otterdijk
parent
66465776cf
commit
bdcc0cff11
@@ -172,6 +172,33 @@ DOCCOMMENT;
|
|||||||
$this->assertSame($expected, $fixture->getDocComment($docBlock));
|
$this->assertSame($expected, $fixture->getDocComment($docBlock));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers ::__construct
|
||||||
|
* @covers ::getDocComment
|
||||||
|
*/
|
||||||
|
public function testNoExtraSpacesAfterTagRemoval()
|
||||||
|
{
|
||||||
|
$expected = <<<'DOCCOMMENT'
|
||||||
|
/**
|
||||||
|
* @unknown-tag
|
||||||
|
*/
|
||||||
|
DOCCOMMENT;
|
||||||
|
|
||||||
|
$expectedAfterRemove = <<<'DOCCOMMENT_AFTER_REMOVE'
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
DOCCOMMENT_AFTER_REMOVE;
|
||||||
|
|
||||||
|
$fixture = new Serializer(0, '', true, 15);
|
||||||
|
$genericTag = new DocBlock\Tags\Generic('unknown-tag');
|
||||||
|
|
||||||
|
$docBlock = new DocBlock('',null, [$genericTag]);
|
||||||
|
$this->assertSame($expected, $fixture->getDocComment($docBlock));
|
||||||
|
|
||||||
|
$docBlock->removeTag($genericTag);
|
||||||
|
$this->assertSame($expectedAfterRemove, $fixture->getDocComment($docBlock));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @expectedException \InvalidArgumentException
|
* @expectedException \InvalidArgumentException
|
||||||
|
|||||||
Reference in New Issue
Block a user