class StaticReflectionParserTest

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Component/Annotation/Doctrine/StaticReflectionParserTest.php \Drupal\Tests\Component\Annotation\Doctrine\StaticReflectionParserTest
  2. 10 core/tests/Drupal/Tests/Component/Annotation/Doctrine/StaticReflectionParserTest.php \Drupal\Tests\Component\Annotation\Doctrine\StaticReflectionParserTest

Tests Drupal\Component\Annotation\Doctrine\StaticReflectionParser.

Attributes

#[CoversClass(StaticReflectionParser::class)] #[Group('Annotation')]

Hierarchy

Expanded class hierarchy of StaticReflectionParserTest

File

core/tests/Drupal/Tests/Component/Annotation/Doctrine/StaticReflectionParserTest.php, line 15

Namespace

Drupal\Tests\Component\Annotation\Doctrine
View source
class StaticReflectionParserTest extends TestCase {
  public function testAttribute(string $class, string $attribute_class, bool $expected) : void {
    $finder = MockFileFinder::create(__DIR__ . '/Fixtures/Attribute/' . $class . '.php');
    $parser = new StaticReflectionParser('\\Drupal\\Tests\\Component\\Annotation\\Doctrine\\Fixtures\\Attribute\\' . $class, $finder);
    $this->assertSame($expected, $parser->hasClassAttribute($attribute_class), "'{$class}' has attribute that is a '{$attribute_class}'");
  }

}

Members

Title Sort descending Modifiers Object type Summary
StaticReflectionParserTest::testAttribute public function

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.