1 layout.test LayoutInterfaceTest::testRegionStyles()

Test region styles.

File

core/modules/layout/tests/layout.test, line 1314
Tests for the Layout module.

Class

LayoutInterfaceTest
Tests the interface for adding, removing, and moving blocks.

Code

function testRegionStyles() {
  $this->backdropGet('admin/structure/layouts/manage/default/configure-region/editor/header');
  $edit = array(
    'element' => 'aside',
    'classes' => 'new-test-class',
  );
  $this->backdropPost(NULL, $edit, t('Save configuration'));
  $this->backdropGet('admin/structure/layouts/manage/default');
  $this->backdropPost(NULL, array(), t('Save layout'));

  $this->backdropGet('node');
  $style_exists = $this->xpath('//header[contains(@class,"l-header")]//aside[contains(@class,"new-test-class")]');
  $this->assertTrue($style_exists, 'Style exists on header div.');
}