You are here

protected function ConfigTest::setUp in Style Switcher 3.0.x

Same name in this branch
  1. 3.0.x tests/src/Functional/ConfigTest.php \Drupal\Tests\styleswitcher\Functional\ConfigTest::setUp()
  2. 3.0.x tests/src/Kernel/ConfigTest.php \Drupal\Tests\styleswitcher\Kernel\ConfigTest::setUp()
Same name and namespace in other branches
  1. 8.2 tests/src/Functional/ConfigTest.php \Drupal\Tests\styleswitcher\Functional\ConfigTest::setUp()

Overrides BrowserTestBase::setUp

File

tests/src/Functional/ConfigTest.php, line 37

Class

ConfigTest
Tests Style Switcher configs.

Namespace

Drupal\Tests\styleswitcher\Functional

Code

protected function setUp() {
  parent::setUp();
  $this
    ->enablePageCaching();

  // Place the block and visit a page so the empty block is cached.
  $this
    ->drupalPlaceBlock('styleswitcher_styleswitcher', [
    'id' => 'styleswitcher',
  ]);
  $this
    ->drupalGet('');

  // Create initial custom styles config.
  $this
    ->config('styleswitcher.custom_styles')
    ->set('styles', $this
    ->composeStylesMockingPaths(range('J', 'A')))
    ->save();
}