function ThemeTest::testTemplateOverride
Same name in other branches
- 9 core/modules/system/tests/src/Functional/Theme/ThemeTest.php \Drupal\Tests\system\Functional\Theme\ThemeTest::testTemplateOverride()
- 8.9.x core/modules/system/tests/src/Functional/Theme/ThemeTest.php \Drupal\Tests\system\Functional\Theme\ThemeTest::testTemplateOverride()
- 11.x core/modules/system/tests/src/Functional/Theme/ThemeTest.php \Drupal\Tests\system\Functional\Theme\ThemeTest::testTemplateOverride()
Ensures a themes template is overridable based on the 'template' filename.
File
-
core/
modules/ system/ tests/ src/ Functional/ Theme/ ThemeTest.php, line 139
Class
- ThemeTest
- Tests low-level theme functions.
Namespace
Drupal\Tests\system\Functional\ThemeCode
public function testTemplateOverride() : void {
$this->config('system.theme')
->set('default', 'test_theme')
->save();
$this->drupalGet('theme-test/template-test');
$this->assertSession()
->pageTextContains('Success: Template overridden.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.