function ThemeTest::testTemplateOverride

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

File

drupal/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php, line 156
Definition of Drupal\system\Tests\Theme\ThemeTest.

Class

ThemeTest
Tests low-level theme functions.

Namespace

Drupal\system\Tests\Theme

Code

function testTemplateOverride() {
  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.');
}