bartik-1.0.2/tests/src/Functional/BartikTest.php

tests/src/Functional/BartikTest.php
<?php

namespace Drupal\Tests\bartik\Functional;

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()->elementExists('xpath', '//link[@rel = "stylesheet"][contains(@href, "/web/themes/custom/bartik")][contains(@href, "/css/components/messages.css")]');
    $this->assertSession()->elementExists('xpath', '//link[@rel = "stylesheet"][contains(@href, "/web/themes/custom/bartik")][contains(@href, "/css/classy/components/messages.css")]');
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc