function AttributeClassDiscoveryTest::testGetPluginNamespaces
Same name in other branches
- 11.x core/tests/Drupal/Tests/Component/Plugin/Attribute/AttributeClassDiscoveryTest.php \Drupal\Tests\Component\Plugin\Attribute\AttributeClassDiscoveryTest::testGetPluginNamespaces()
@covers ::__construct @covers ::getPluginNamespaces
File
-
core/
tests/ Drupal/ Tests/ Component/ Plugin/ Attribute/ AttributeClassDiscoveryTest.php, line 42
Class
- AttributeClassDiscoveryTest
- @coversDefaultClass \Drupal\Component\Plugin\Discovery\AttributeClassDiscovery @group Attribute @runTestsInSeparateProcesses
Namespace
Drupal\Tests\Component\Plugin\AttributeCode
public function testGetPluginNamespaces() : void {
// Path to the classes which we'll discover and parse annotation.
$discovery = new AttributeClassDiscovery([
'com/example' => [
__DIR__,
],
]);
$reflection = new \ReflectionMethod($discovery, 'getPluginNamespaces');
$reflection->setAccessible(TRUE);
$result = $reflection->invoke($discovery);
$this->assertEquals([
'com/example' => [
__DIR__,
],
], $result);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.