3 namespace Drupal\Tests\system\Functional\Theme;
5 use Drupal\Tests\BrowserTestBase;
8 * Tests that the theme system can be correctly initialized early in the page
13 class ThemeEarlyInitializationTest extends BrowserTestBase {
20 public static $modules = ['theme_test'];
23 * Test that the theme system can generate output in a request listener.
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');