Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / system / tests / src / Functional / Theme / ThemeEarlyInitializationTest.php
1 <?php
2
3 namespace Drupal\Tests\system\Functional\Theme;
4
5 use Drupal\Tests\BrowserTestBase;
6
7 /**
8  * Tests that the theme system can be correctly initialized early in the page
9  * request.
10  *
11  * @group Theme
12  */
13 class ThemeEarlyInitializationTest extends BrowserTestBase {
14
15   /**
16    * Modules to enable.
17    *
18    * @var array
19    */
20   public static $modules = ['theme_test'];
21
22   /**
23    * Test that the theme system can generate output in a request listener.
24    */
25   public function testRequestListener() {
26     $this->drupalGet('theme-test/request-listener');
27     // Verify that themed output generated in the request listener appears.
28     $this->assertRaw('Themed output generated in a KernelEvents::REQUEST listener');
29     // Verify that the default theme's CSS still appears even though the theme
30     // system was initialized early.
31     $this->assertRaw('classy/css/components/action-links.css');
32   }
33
34 }