You are here

public function ClassNotFoundFatalErrorHandlerTest::testLegacyHandleClassNotFound in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php \Symfony\Component\Debug\Tests\FatalErrorHandler\ClassNotFoundFatalErrorHandlerTest::testLegacyHandleClassNotFound()

@group legacy

File

vendor/symfony/debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php, line 74

Class

ClassNotFoundFatalErrorHandlerTest

Namespace

Symfony\Component\Debug\Tests\FatalErrorHandler

Code

public function testLegacyHandleClassNotFound() {
  $prefixes = array(
    'Symfony\\Component\\Debug\\Exception\\' => realpath(__DIR__ . '/../../Exception'),
  );
  $symfonyUniversalClassLoader = new SymfonyUniversalClassLoader();
  $symfonyUniversalClassLoader
    ->registerPrefixes($prefixes);
  $this
    ->testHandleClassNotFound(array(
    'type' => 1,
    'line' => 12,
    'file' => 'foo.php',
    'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found',
  ), "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\\Bar\".\nDid you forget a \"use\" statement for \"Symfony\\Component\\Debug\\Exception\\UndefinedFunctionException\"?", array(
    $symfonyUniversalClassLoader,
    'loadClass',
  ));
}