diff --git a/tests/src/Kernel/StatusMessagesTest.php b/tests/src/Kernel/StatusMessagesTest.php index eda4f4655..b29bd5af3 100644 --- a/tests/src/Kernel/StatusMessagesTest.php +++ b/tests/src/Kernel/StatusMessagesTest.php @@ -73,12 +73,9 @@ public function testStatusMessages(array $data): void { $this->assertCount(1, $title, sprintf('Wrong number of headings found for "%s" messages.', $type)); $this->assertEquals($heading, trim($title->first()->text())); - $list_items = $wrapper->filter('p.ecl-message__description span'); - $this->assertSameSize($messages, $list_items, sprintf('Wrong number of "%s" messages found.', $type)); - - foreach ($messages as $delta => $message) { - $this->assertEquals($message, trim($list_items->eq($delta)->text())); - } + $description = $wrapper->filter('div.ecl-message__description'); + $this->assertCount(1, $description, sprintf('Wrong number of "%s" messages found.', $type)); + $this->assertEquals(implode($messages), trim($description->text())); } // Verify that no message types other than the ones present in the test data @@ -124,8 +121,8 @@ public function statusMessagesProvider(): array { [ [ MessengerInterface::TYPE_STATUS => [ - 'Status message 1.', - 'Status message 2.', + '
Status message 1.
Warning message 1.
Error message 2.
Status message 1.
Warning message 1.
', ], ], ], @@ -181,12 +178,12 @@ public function statusMessagesProvider(): array { [ [ MessengerInterface::TYPE_ERROR => [ - 'Error message 1.', + 'Error message 1.