BartikTest.php

Same filename in other branches
  1. 9 core/themes/bartik/tests/src/Functional/BartikTest.php

Namespace

Drupal\FunctionalTests\Theme

File

core/tests/Drupal/FunctionalTests/Theme/BartikTest.php

View source
<?php

namespace Drupal\FunctionalTests\Theme;

use Drupal\Tests\BrowserTestBase;

/**
 * Tests the Bartik theme.
 *
 * @group bartik
 */
class BartikTest extends BrowserTestBase {
    
    /**
     * {@inheritdoc}
     */
    protected $defaultTheme = 'bartik';
    
    /**
     * Tests that the Bartik theme always adds its message CSS files.
     *
     * @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('bartik/css/classy/components/messages.css');
    }

}

Classes

Title Deprecated Summary
BartikTest Tests the Bartik theme.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.