You are here

function ThemeTest::testTemplateOverride in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Theme/ThemeTest.php \Drupal\system\Tests\Theme\ThemeTest::testTemplateOverride()

Ensures a themes template is overridable based on the 'template' filename.

File

core/modules/system/src/Tests/Theme/ThemeTest.php, line 194
Contains \Drupal\system\Tests\Theme\ThemeTest.

Class

ThemeTest
Tests low-level theme functions.

Namespace

Drupal\system\Tests\Theme

Code

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.');
}