class StaticReflectionParserTest
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/Component/Annotation/Doctrine/StaticReflectionParserTest.php \Drupal\Tests\Component\Annotation\Doctrine\StaticReflectionParserTest
- 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
- class \Drupal\Tests\Component\Annotation\Doctrine\StaticReflectionParserTest extends \PHPUnit\Framework\TestCase
Expanded class hierarchy of StaticReflectionParserTest
File
-
core/
tests/ Drupal/ Tests/ Component/ Annotation/ Doctrine/ StaticReflectionParserTest.php, line 15
Namespace
Drupal\Tests\Component\Annotation\DoctrineView 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
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.