public function DocParserTest::testAnnotationWithInvalidTargetDeclarationError

@expectedException \InvalidArgumentException @expectedExceptionMessage Invalid Target "Foo". Available targets: [ALL, CLASS, METHOD, PROPERTY, ANNOTATION]

File

drupal/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/DocParserTest.php, line 813

Class

DocParserTest

Namespace

Doctrine\Tests\Common\Annotations

Code

public function testAnnotationWithInvalidTargetDeclarationError() {
  $parser = $this
    ->createTestParser();
  $context = 'class ' . 'SomeClassName';
  $docblock = <<<DOCBLOCK
/**
 * @AnnotationWithInvalidTargetDeclaration()
 */
DOCBLOCK;
  $parser
    ->setTarget(Target::TARGET_CLASS);
  $parser
    ->parse($docblock, $context);
}