Unverified Commit 9346c2ff authored by alexpott's avatar alexpott

Issue #3159739 by jungle, Beakerboy, daffie: Avoid directly comparing string...

Issue #3159739 by jungle, Beakerboy, daffie: Avoid directly comparing string to blob in EntityDisplayTest
parent 19799280
...@@ -638,14 +638,13 @@ public function testComponentDependencies() { ...@@ -638,14 +638,13 @@ public function testComponentDependencies() {
$this->assertTrue($form_display->get('hidden')[$field_name]); $this->assertTrue($form_display->get('hidden')[$field_name]);
// The correct warning message has been logged. // The correct warning message has been logged.
$arguments = ['@display' => (string) t('Entity form display'), '@id' => $form_display->id(), '@name' => $field_name]; $arguments = ['@display' => (string) t('Entity form display'), '@id' => $form_display->id(), '@name' => $field_name];
$logged = (bool) Database::getConnection()->select('watchdog', 'w') $variables = Database::getConnection()->select('watchdog', 'w')
->fields('w', ['wid']) ->fields('w', ['variables'])
->condition('type', 'system') ->condition('type', 'system')
->condition('message', "@display '@id': Component '@name' was disabled because its settings depend on removed dependencies.") ->condition('message', "@display '@id': Component '@name' was disabled because its settings depend on removed dependencies.")
->condition('variables', serialize($arguments))
->execute() ->execute()
->fetchAll(); ->fetchField();
$this->assertTrue($logged); $this->assertEquals($arguments, unserialize($variables));
} }
/** /**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment