You are here

public function ClassLoaderTest::testLoadClassFromFallback in Zircon Profile 8

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

@dataProvider getLoadClassFromFallbackTests

File

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

Class

ClassLoaderTest

Namespace

Symfony\Component\ClassLoader\Tests

Code

public function testLoadClassFromFallback($className, $testClassName, $message) {
  $loader = new ClassLoader();
  $loader
    ->addPrefix('Namespaced2\\', __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures');
  $loader
    ->addPrefix('Pearlike2_', __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures');
  $loader
    ->addPrefix('', array(
    __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures/fallback',
  ));
  $loader
    ->loadClass($testClassName);
  $this
    ->assertTrue(class_exists($className), $message);
}