protected function FeedsTamperJavascriptTestBase::assertNoPhpErrorsInLog in Feeds Tamper 8.2
Asserts that the logs do not contain PHP errors.
2 calls to FeedsTamperJavascriptTestBase::assertNoPhpErrorsInLog()
- UiCrudTest::testAddTamperInstance in tests/
src/ FunctionalJavascript/ UiCrudTest.php - Tests adding a Tamper plugin using the UI using javascript.
- UiCrudTest::testLabelUpdateWhenChangingPlugin in tests/
src/ FunctionalJavascript/ UiCrudTest.php - Tests that the label gets updated when selecting an other plugin.
File
- tests/
src/ FunctionalJavascript/ FeedsTamperJavascriptTestBase.php, line 44
Class
- FeedsTamperJavascriptTestBase
- Base class for Feeds Tamper javascript tests.
Namespace
Drupal\Tests\feeds_tamper\FunctionalJavascriptCode
protected function assertNoPhpErrorsInLog() {
$logs = \Drupal::database()
->select('watchdog', 'w')
->fields('w')
->condition('w.type', 'php', '=')
->execute()
->fetchAll();
$message = 'There were no PHP errors.';
if (!empty($logs)) {
$errors = [];
foreach ($logs as $log_entry) {
// Format the error message.
$log_entry->variables = unserialize($log_entry->variables);
$errors[] = strtr($log_entry->message, $log_entry->variables);
}
$message = implode("\n", $errors);
}
$this
->assertEmpty($logs, $message);
}