You are here

public function DescriptionTest::testNestedLiteralOpeningDelimiter in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/DescriptionTest.php \phpDocumentor\Reflection\DocBlock\DescriptionTest::testNestedLiteralOpeningDelimiter()

File

vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/DescriptionTest.php, line 130

Class

DescriptionTest
Test class for \phpDocumentor\Reflection\DocBlock\Description

Namespace

phpDocumentor\Reflection\DocBlock

Code

public function testNestedLiteralOpeningDelimiter() {
  $fixture = <<<LONGDESC
This is text for a description containing {@internal inline tag that has { that
is literal}.
LONGDESC;
  $object = new Description($fixture);
  $this
    ->assertSame($fixture, $object
    ->getContents());
  $parsedContents = $object
    ->getParsedContents();
  $this
    ->assertCount(3, $parsedContents);
  $this
    ->assertSame('This is text for a description containing ', $parsedContents[0]);
  $this
    ->assertInstanceOf(__NAMESPACE__ . '\\Tag', $parsedContents[1]);
  $this
    ->assertSame('.', $parsedContents[2]);
  $this
    ->assertSame(array(
    'inline tag that has { that
is literal',
  ), $parsedContents[1]
    ->getParsedDescription());
}