function UncaughtExceptionTest::assertNoErrorsLogged
Same name in other branches
- 9 core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php \Drupal\FunctionalTests\Bootstrap\UncaughtExceptionTest::assertNoErrorsLogged()
- 8.9.x core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php \Drupal\FunctionalTests\Bootstrap\UncaughtExceptionTest::assertNoErrorsLogged()
- 11.x core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php \Drupal\FunctionalTests\Bootstrap\UncaughtExceptionTest::assertNoErrorsLogged()
Asserts that no errors have been logged to the PHP error.log thus far.
@internal
See also
\Drupal\Core\Test\FunctionalTestSetupTrait::prepareEnvironment()
\Drupal\Core\DrupalKernel::bootConfiguration()
1 call to UncaughtExceptionTest::assertNoErrorsLogged()
- UncaughtExceptionTest::testLoggerException in core/
tests/ Drupal/ FunctionalTests/ Bootstrap/ UncaughtExceptionTest.php - Tests fallback to PHP error log when an exception is thrown while logging.
File
-
core/
tests/ Drupal/ FunctionalTests/ Bootstrap/ UncaughtExceptionTest.php, line 294
Class
- UncaughtExceptionTest
- Tests kernel panic when things are really messed up.
Namespace
Drupal\FunctionalTests\BootstrapCode
protected function assertNoErrorsLogged() : void {
// Since PHP only creates the error.log file when an actual error is
// triggered, it is sufficient to check whether the file exists.
$this->assertFileDoesNotExist(DRUPAL_ROOT . '/' . $this->siteDirectory . '/error.log');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.