public function DocParserTest::testSupportClassConstants

@dataProvider getConstantsProvider

File

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

Class

DocParserTest

Namespace

Doctrine\Tests\Common\Annotations

Code

public function testSupportClassConstants($docblock, $expected) {
  $parser = $this
    ->createTestParser();
  $parser
    ->setImports(array(
    'classwithconstants' => 'Doctrine\\Tests\\Common\\Annotations\\Fixtures\\ClassWithConstants',
    'intefacewithconstants' => 'Doctrine\\Tests\\Common\\Annotations\\Fixtures\\IntefaceWithConstants',
    'annotationwithconstants' => 'Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithConstants',
  ));
  $result = $parser
    ->parse($docblock);
  $this
    ->assertInstanceOf('\\Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithConstants', $annotation = $result[0]);
  $this
    ->assertEquals($expected, $annotation->value);
}