You are here

public function DsTestTrait::dsConfigureClasses in Display Suite 8.4

Same name and namespace in other branches
  1. 8.3 tests/src/Functional/DsTestTrait.php \Drupal\Tests\ds\Functional\DsTestTrait::dsConfigureClasses()

Configure classes.

1 call to DsTestTrait::dsConfigureClasses()
LayoutClassesTest::testDsTestLayouts in tests/src/Functional/LayoutClassesTest.php
Test selecting layouts, classes, region to block and fields.

File

tests/src/Functional/DsTestTrait.php, line 38

Class

DsTestTrait
Provides common functionality for the Display Suite test classes.

Namespace

Drupal\Tests\ds\Functional

Code

public function dsConfigureClasses($edit = []) {
  $edit += [
    'regions' => "class_name_1\nclass_name_2|Friendly name",
  ];
  $this
    ->drupalGet('admin/structure/ds/classes');
  $this
    ->submitForm($edit, 'Save configuration');
  $this
    ->assertSession()
    ->pageTextContains('The configuration options have been saved.');
  $this
    ->assertSession()
    ->responseContains('class_name_1', 'Class name 1 found');
  $this
    ->assertSession()
    ->responseContains('class_name_2', 'Class name 1 found');
}