You are here

public function ClassLoaderTest::testGetPrefixes in Zircon Profile 8.0

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

File

vendor/symfony/class-loader/Tests/ClassLoaderTest.php, line 18

Class

ClassLoaderTest

Namespace

Symfony\Component\ClassLoader\Tests

Code

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