You are here

public static function ClassNotFoundFatalErrorHandlerTest::setUpBeforeClass in Zircon Profile 8.0

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

File

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

Class

ClassNotFoundFatalErrorHandlerTest

Namespace

Symfony\Component\Debug\Tests\FatalErrorHandler

Code

public static function setUpBeforeClass() {
  foreach (spl_autoload_functions() as $function) {
    if (!is_array($function)) {
      continue;
    }

    // get class loaders wrapped by DebugClassLoader
    if ($function[0] instanceof DebugClassLoader) {
      $function = $function[0]
        ->getClassLoader();
    }
    if ($function[0] instanceof ComposerClassLoader) {
      $function[0]
        ->add('Symfony_Component_Debug_Tests_Fixtures', dirname(dirname(dirname(dirname(dirname(__DIR__))))));
      break;
    }
  }
}