BartikTest.php 939 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace Drupal\FunctionalTests\Theme;
  3. use Drupal\Tests\BrowserTestBase;
  4. /**
  5. * Tests the Bartik theme.
  6. *
  7. * @group bartik
  8. */
  9. class BartikTest extends BrowserTestBase {
  10. /**
  11. * {@inheritdoc}
  12. */
  13. public function setUp() {
  14. parent::setUp();
  15. $this->assertTrue($this->container->get('theme_installer')->install(['bartik']));
  16. $this->container->get('config.factory')
  17. ->getEditable('system.theme')
  18. ->set('default', 'bartik')
  19. ->save();
  20. }
  21. /**
  22. * Tests that the Bartik theme always adds its message CSS and Classy's.
  23. *
  24. * @see bartik.libraries.yml
  25. * @see classy.info.yml
  26. */
  27. public function testRegressionMissingMessagesCss() {
  28. $this->drupalGet('');
  29. $this->assertSession()->statusCodeEquals(200);
  30. $this->assertSession()->responseContains('bartik/css/components/messages.css');
  31. $this->assertSession()->responseContains('classy/css/components/messages.css');
  32. }
  33. }