You are here

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

@dataProvider getLoadClassFromFallbackTests

File

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

Class

LegacyUniversalClassLoaderTest
@group legacy

Namespace

Symfony\Component\ClassLoader\Tests

Code

public function testLoadClassFromFallback($className, $testClassName, $message) {
  $loader = new UniversalClassLoader();
  $loader
    ->registerNamespace('Namespaced', __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures');
  $loader
    ->registerPrefix('Pearlike_', __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures');
  $loader
    ->registerNamespaceFallbacks(array(
    __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures/fallback',
  ));
  $loader
    ->registerPrefixFallbacks(array(
    __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures/fallback',
  ));
  $this
    ->assertTrue($loader
    ->loadClass($testClassName));
  $this
    ->assertTrue(class_exists($className), $message);
}