diff --git a/core/tests/Drupal/KernelTests/Core/Common/DrupalSetMessageLoadsCssTest.php b/core/tests/Drupal/KernelTests/Core/Common/DrupalSetMessageLoadsCssTest.php new file mode 100644 index 0000000..5250978 --- /dev/null +++ b/core/tests/Drupal/KernelTests/Core/Common/DrupalSetMessageLoadsCssTest.php @@ -0,0 +1,46 @@ +drupalGet(""); + // Check that message assets are loaded. + $this->assertRaw("core/themes/classy/css/components/messages.css", "Message CSS assets should be loaded.") + + // Display a message. + drupal_set_message(t('A message: @foo', ['@foo' => 'bar'])); + + // Get the frontpage. + $this->drupalGet(""); + // Check that messages are display. + $this->assertRaw("A message:", "The Drupal message should be displayed."); + + // Check that message assets are not loaded. + $this->assertNoRaw("message.css", "Message CSS assets should not be loaded.") + } +}