Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / system / tests / src / Functional / Render / DisplayVariantTest.php
1 <?php
2
3 namespace Drupal\Tests\system\Functional\Render;
4
5 use Drupal\Tests\BrowserTestBase;
6
7 /**
8  * Tests selecting a display variant.
9  *
10  * @group Render
11  */
12 class DisplayVariantTest extends BrowserTestBase {
13
14   /**
15    * Modules to enable.
16    *
17    * @var array
18    */
19   public static $modules = ['display_variant_test'];
20
21   /**
22    * Tests selecting the variant and passing configuration.
23    */
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
27     // error page here.
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');
32   }
33
34 }