public function ClassLoaderTest::testGetPrefixes

File

drupal/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/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);
}