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()
- 10 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 136
Class
- ThemeTest
- Tests low-level theme functions.
Namespace
Drupal\Tests\system\Functional\ThemeCode
public function testTemplateOverride() {
$this->config('system.theme')
->set('default', 'test_theme')
->save();
$this->drupalGet('theme-test/template-test');
$this->assertText('Success: Template overridden.', 'Template overridden by defined \'template\' filename.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.