public function LoggerWebTest::testLoggerLogWarning in Ultimate Cron 8.2
Tests that the logger handles an exception correctly.
File
- tests/
src/ Functional/ LoggerWebTest.php, line 116
Class
- LoggerWebTest
- Tests that scheduler plugins are discovered correctly.
Namespace
Drupal\Tests\ultimate_cron\FunctionalCode
public function testLoggerLogWarning() {
\Drupal::state()
->set('ultimate_cron_logger_test_cron_action', 'log_warning');
// Run cron to get an exception from ultimate_cron_logger_test module.
$this
->cronRun();
// Check that the error message is displayed in its log page.
$this
->drupalGet('admin/config/system/cron/jobs/logs/ultimate_cron_logger_test_cron');
$this
->assertRaw('/core/misc/icons/e29700/warning.svg');
$this
->assertRaw('This is a warning message');
}