You are here

public function MultiThemeTest::testBlockLinks in Style Switcher 8.2

Same name and namespace in other branches
  1. 3.0.x tests/src/Functional/MultiThemeTest.php \Drupal\Tests\styleswitcher\Functional\MultiThemeTest::testBlockLinks()

Tests links in the Style Switcher block.

File

tests/src/Functional/MultiThemeTest.php, line 120

Class

MultiThemeTest
Tests with themes that have styleswitcher config.

Namespace

Drupal\Tests\styleswitcher\Functional

Code

public function testBlockLinks() {
  foreach ($this->themeStyles as $theme => $styles) {

    // Open a page where the $theme is active.
    $page_path = 'styleswitcher-test-theme-per-page/' . $theme;
    $block_selector = '#block-styleswitcher-' . strtr($theme, '_', '-');
    $this
      ->assertStylesList($styles['front'], $block_selector, $page_path);
  }
}