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()
- 10 core/modules/system/tests/src/Functional/Theme/ThemeTest.php \Drupal\Tests\system\Functional\Theme\ThemeTest::testClassLoading()
- 11.x 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->assertText('Loading ThemeClass was successful.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.