Security update for Core, with self-updated composer
[yaffs-website] / web / core / tests / Drupal / FunctionalTests / Theme / BartikTest.php
diff --git a/web/core/tests/Drupal/FunctionalTests/Theme/BartikTest.php b/web/core/tests/Drupal/FunctionalTests/Theme/BartikTest.php
new file mode 100644 (file)
index 0000000..8ef9db4
--- /dev/null
@@ -0,0 +1,40 @@
+<?php
+
+namespace Drupal\FunctionalTests\Theme;
+
+use Drupal\Tests\BrowserTestBase;
+
+/**
+ * Tests the Bartik theme.
+ *
+ * @group bartik
+ */
+class BartikTest extends BrowserTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setUp() {
+    parent::setUp();
+
+    $this->assertTrue($this->container->get('theme_installer')->install(['bartik']));
+    $this->container->get('config.factory')
+      ->getEditable('system.theme')
+      ->set('default', 'bartik')
+      ->save();
+  }
+
+  /**
+   * Tests that the Bartik theme always adds its message CSS and Classy's.
+   *
+   * @see bartik.libraries.yml
+   * @see classy.info.yml
+   */
+  public function testRegressionMissingMessagesCss() {
+    $this->drupalGet('');
+    $this->assertSession()->statusCodeEquals(200);
+    $this->assertSession()->responseContains('bartik/css/components/messages.css');
+    $this->assertSession()->responseContains('classy/css/components/messages.css');
+  }
+
+}