3 namespace Drupal\Tests\system\Functional\Render;
5 use Drupal\Tests\BrowserTestBase;
8 * Tests selecting a display variant.
12 class DisplayVariantTest extends BrowserTestBase {
19 public static $modules = ['display_variant_test'];
22 * Tests selecting the variant and passing configuration.
24 public function testPageDisplayVariantSelectionEvent() {
25 // Tests that our display variant was selected, and that its configuration
26 // was passed correctly. If the configuration wasn't passed, we'd get an
28 $this->drupalGet('<front>');
29 $this->assertRaw('A very important, required value.');
30 $this->assertRaw('Explicitly passed in context.');
31 $this->assertCacheTag('custom_cache_tag');