You are here

public function DocBlockTest::testTagCaseSensitivity in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlockTest.php \phpDocumentor\Reflection\DocBlockTest::testTagCaseSensitivity()

File

vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlockTest.php, line 224

Class

DocBlockTest
Test class for phpDocumentor\Reflection\DocBlock

Namespace

phpDocumentor\Reflection

Code

public function testTagCaseSensitivity() {
  $fixture = <<<DOCBLOCK
/**
 * This is a short description.
 *
 * This is a long description.
 *
 * @method null something()
 * @Method({"GET", "POST"})
 */
DOCBLOCK;
  $object = new DocBlock($fixture);
  $this
    ->assertEquals('This is a short description.', $object
    ->getShortDescription());
  $this
    ->assertEquals('This is a long description.', $object
    ->getLongDescription()
    ->getContents());
  $tags = $object
    ->getTags();
  $this
    ->assertCount(2, $tags);
  $this
    ->assertTrue($object
    ->hasTag('method'));
  $this
    ->assertTrue($object
    ->hasTag('Method'));
  $this
    ->assertInstanceOf(__NAMESPACE__ . '\\DocBlock\\Tag\\MethodTag', $tags[0]);
  $this
    ->assertInstanceOf(__NAMESPACE__ . '\\DocBlock\\Tag', $tags[1]);
  $this
    ->assertNotInstanceOf(__NAMESPACE__ . '\\DocBlock\\Tag\\MethodTag', $tags[1]);
}