public function AnnotatedClassDiscoveryTest::testGetPluginNamespaces in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Component/Annotation/AnnotatedClassDiscoveryTest.php \Drupal\Tests\Component\Annotation\AnnotatedClassDiscoveryTest::testGetPluginNamespaces()
- 10 core/tests/Drupal/Tests/Component/Annotation/AnnotatedClassDiscoveryTest.php \Drupal\Tests\Component\Annotation\AnnotatedClassDiscoveryTest::testGetPluginNamespaces()
@covers ::__construct @covers ::getPluginNamespaces
File
- core/
tests/ Drupal/ Tests/ Component/ Annotation/ AnnotatedClassDiscoveryTest.php, line 32
Class
- AnnotatedClassDiscoveryTest
- @coversDefaultClass \Drupal\Component\Annotation\Plugin\Discovery\AnnotatedClassDiscovery @group Annotation @runTestsInSeparateProcesses
Namespace
Drupal\Tests\Component\AnnotationCode
public function testGetPluginNamespaces() {
$discovery = new AnnotatedClassDiscovery([
'com/example' => [
__DIR__,
],
]);
$reflection = new \ReflectionMethod($discovery, 'getPluginNamespaces');
$reflection
->setAccessible(TRUE);
$result = $reflection
->invoke($discovery);
$this
->assertEquals([
'com/example' => [
__DIR__,
],
], $result);
}