function ThemeTest::testClassLoading
Same name in other branches
- 9 core/modules/system/tests/src/Functional/Theme/ThemeTest.php \Drupal\Tests\system\Functional\Theme\ThemeTest::testClassLoading()
- 8.9.x core/modules/system/tests/src/Functional/Theme/ThemeTest.php \Drupal\Tests\system\Functional\Theme\ThemeTest::testClassLoading()
- 10 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 93
Class
- ThemeTest
- Tests low-level theme functions.
Namespace
Drupal\Tests\system\Functional\ThemeCode
public function testClassLoading() : void {
// 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.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.