You are here

function DisplayVariantTest::testPageDisplayVariantSelectionEvent in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Render/DisplayVariantTest.php \Drupal\system\Tests\Render\DisplayVariantTest::testPageDisplayVariantSelectionEvent()

Tests selecting the variant and passing configuration.

File

core/modules/system/src/Tests/Render/DisplayVariantTest.php, line 29
Contains \Drupal\system\Tests\Render\DisplayVariantTest.

Class

DisplayVariantTest
Tests selecting a display variant.

Namespace

Drupal\system\Tests\Render

Code

function testPageDisplayVariantSelectionEvent() {

  // Tests that our display variant was selected, and that its configuration
  // was passed correctly. If the configuration wasn't passed, we'd get an
  // error page here.
  $this
    ->drupalGet('<front>');
  $this
    ->assertRaw('A very important, required value.');
  $this
    ->assertRaw('Explicitly passed in context.');
  $this
    ->assertCacheTag('custom_cache_tag');
}