function LayoutDerivativesTest::testPageLayout

Test layout functionality as applies to pages.

File

drupal/core/modules/layout/lib/Drupal/layout/Tests/LayoutDerivativesTest.php, line 100
Definition of Drupal\layout\Tests\LayoutDerivativesTest.

Class

LayoutDerivativesTest
Tests the layout system derivatives.

Namespace

Drupal\layout\Tests

Code

function testPageLayout() {

  // The layout-test page uses the layout_test_theme page layout.
  $this
    ->drupalGet('layout-test');
  $this
    ->assertText('Left side');
  $this
    ->assertText('Right side');
  $this
    ->assertRaw('<div class="layout-region layout-col-right">');

  // Ensure the CSS was added.
  $this
    ->assertRaw('@import url("' . url('', array(
    'absolute' => TRUE,
  )) . drupal_get_path('theme', 'layout_test_theme') . '/layouts/static/two-col/two-col.css');
}