You are here

public function Psr4ClassLoaderTest::testLoadClass in Zircon Profile 8

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

@dataProvider getLoadClassTests

Parameters

string $className:

File

vendor/symfony/class-loader/Tests/Psr4ClassLoaderTest.php, line 22

Class

Psr4ClassLoaderTest

Namespace

Symfony\Component\ClassLoader\Tests

Code

public function testLoadClass($className) {
  $loader = new Psr4ClassLoader();
  $loader
    ->addPrefix('Acme\\DemoLib', __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures' . DIRECTORY_SEPARATOR . 'psr-4');
  $loader
    ->loadClass($className);
  $this
    ->assertTrue(class_exists($className), sprintf('loadClass() should load %s', $className));
}