You are here

public function LegacyUniversalClassLoaderTest::testGetNamespaces in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/class-loader/Tests/LegacyUniversalClassLoaderTest.php \Symfony\Component\ClassLoader\Tests\LegacyUniversalClassLoaderTest::testGetNamespaces()

File

vendor/symfony/class-loader/Tests/LegacyUniversalClassLoaderTest.php, line 60

Class

LegacyUniversalClassLoaderTest
@group legacy

Namespace

Symfony\Component\ClassLoader\Tests

Code

public function testGetNamespaces() {
  $loader = new UniversalClassLoader();
  $loader
    ->registerNamespace('Foo', __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures');
  $loader
    ->registerNamespace('Bar', __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures');
  $loader
    ->registerNamespace('Bas', __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures');
  $namespaces = $loader
    ->getNamespaces();
  $this
    ->assertArrayHasKey('Foo', $namespaces);
  $this
    ->assertArrayNotHasKey('Foo1', $namespaces);
  $this
    ->assertArrayHasKey('Bar', $namespaces);
  $this
    ->assertArrayHasKey('Bas', $namespaces);
}