You are here

public function Psr4ClassLoaderTest::testLoadNonexistentClass in Zircon Profile 8.0

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

@dataProvider getLoadNonexistentClassTests

Parameters

string $className:

File

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

Class

Psr4ClassLoaderTest

Namespace

Symfony\Component\ClassLoader\Tests

Code

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