You are here

public function LayoutSectionClassesTest::testLayoutSectionClasses in Layout Section Classes 8

Test the layout section classes.

File

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

Class

LayoutSectionClassesTest
Test layout section classes.

Namespace

Drupal\Tests\layout_section_classes\Functional

Code

public function testLayoutSectionClasses() {
  $sections = $this->entity
    ->get(OverridesSectionStorage::FIELD_NAME);
  $sections
    ->appendSection(new Section('test_layout', [
    'additional' => [
      'classes' => [
        'style' => 'background--wave-dark background--primary-light',
      ],
    ],
  ]));
  $this->entity
    ->save();
  $this
    ->assertContains('background--wave-dark background--primary-light', $this
    ->renderEntity());
}