You are here

public function StaticReflectionParserTest::testClassAnnotationOptimizedParsing in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/common/tests/Doctrine/Tests/Common/Reflection/StaticReflectionParserTest.php \Doctrine\Tests\Common\Reflection\StaticReflectionParserTest::testClassAnnotationOptimizedParsing()

@dataProvider classAnnotationOptimize

File

vendor/doctrine/common/tests/Doctrine/Tests/Common/Reflection/StaticReflectionParserTest.php, line 69

Class

StaticReflectionParserTest

Namespace

Doctrine\Tests\Common\Reflection

Code

public function testClassAnnotationOptimizedParsing($classAnnotationOptimize) {
  $testsRoot = substr(__DIR__, 0, -strlen(__NAMESPACE__) - 1);
  $paths = array(
    'Doctrine\\Tests' => array(
      $testsRoot,
    ),
  );
  $staticReflectionParser = new StaticReflectionParser('Doctrine\\Tests\\Common\\Reflection\\ExampleAnnotationClass', new Psr0FindFile($paths), $classAnnotationOptimize);
  $expectedDocComment = '/**
 * @Annotation(
 *   key = "value"
 * )
 */';
  $this
    ->assertEquals($expectedDocComment, $staticReflectionParser
    ->getDocComment('class'));
}