diff --git a/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php b/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php index 45e1640423..fc78fab5ab 100644 --- a/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php +++ b/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php @@ -638,14 +638,13 @@ public function testComponentDependencies() { $this->assertTrue($form_display->get('hidden')[$field_name]); // The correct warning message has been logged. $arguments = ['@display' => (string) t('Entity form display'), '@id' => $form_display->id(), '@name' => $field_name]; - $logged = (bool) Database::getConnection()->select('watchdog', 'w') - ->fields('w', ['wid']) + $variables = Database::getConnection()->select('watchdog', 'w') + ->fields('w', ['variables']) ->condition('type', 'system') ->condition('message', "@display '@id': Component '@name' was disabled because its settings depend on removed dependencies.") - ->condition('variables', serialize($arguments)) ->execute() - ->fetchAll(); - $this->assertTrue($logged); + ->fetchField(); + $this->assertEquals(serialize($arguments), $variables); } /**