public function ThemeTest::testClassLoading in Drupal 9
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Functional/Theme/ThemeTest.php \Drupal\Tests\system\Functional\Theme\ThemeTest::testClassLoading()
Tests theme can provide classes.
File
- core/
modules/ system/ tests/ src/ Functional/ Theme/ ThemeTest.php, line 91
Class
- ThemeTest
- Tests low-level theme functions.
Namespace
Drupal\Tests\system\Functional\ThemeCode
public function testClassLoading() {
// Install test theme and set it as default.
$this
->config('system.theme')
->set('default', 'test_theme')
->save();
$this
->resetAll();
// Visit page controller and confirm that the theme class is loaded.
$this
->drupalGet('/theme-test/test-theme-class');
$this
->assertSession()
->pageTextContains('Loading ThemeClass was successful.');
}