function Application::loadBootstrapScript
1 call to Application::loadBootstrapScript()
- Application::run in vendor/
phpunit/ phpunit/ src/ TextUI/ Application.php
File
-
vendor/
phpunit/ phpunit/ src/ TextUI/ Application.php, line 331
Class
- Application
- @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
Namespace
PHPUnit\TextUICode
private function loadBootstrapScript(string $filename) : void {
if (!is_readable($filename)) {
$this->exitWithErrorMessage(sprintf('Cannot open bootstrap script "%s"', $filename));
}
try {
include_once $filename;
} catch (Throwable $t) {
$message = sprintf('Error in bootstrap script: %s:%s%s%s%s', $t::class, PHP_EOL, $t->getMessage(), PHP_EOL, $t->getTraceAsString());
while ($t = $t->getPrevious()) {
$message .= sprintf('%s%sPrevious error: %s:%s%s%s%s', PHP_EOL, PHP_EOL, $t::class, PHP_EOL, $t->getMessage(), PHP_EOL, $t->getTraceAsString());
}
$this->exitWithErrorMessage($message);
}
EventFacade::emitter()->testRunnerBootstrapFinished($filename);
}