You are here

public function LegacyUniversalClassLoaderTest::testGetPrefixes 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::testGetPrefixes()

File

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

Class

LegacyUniversalClassLoaderTest
@group legacy

Namespace

Symfony\Component\ClassLoader\Tests

Code

public function testGetPrefixes() {
  $loader = new UniversalClassLoader();
  $loader
    ->registerPrefix('Foo', __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures');
  $loader
    ->registerPrefix('Bar', __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures');
  $loader
    ->registerPrefix('Bas', __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures');
  $prefixes = $loader
    ->getPrefixes();
  $this
    ->assertArrayHasKey('Foo', $prefixes);
  $this
    ->assertArrayNotHasKey('Foo1', $prefixes);
  $this
    ->assertArrayHasKey('Bar', $prefixes);
  $this
    ->assertArrayHasKey('Bas', $prefixes);
}