function DeprecatedTemplateTest::testDeprecatedTemplate

Same name and namespace in other branches
  1. 10 core/modules/system/tests/src/Functional/Module/DeprecatedTemplateTest.php \Drupal\Tests\system\Functional\Module\DeprecatedTemplateTest::testDeprecatedTemplate()

Tests that the deprecated template is marked as deprecated.

@group legacy

File

core/modules/system/tests/src/Functional/Module/DeprecatedTemplateTest.php, line 33

Class

DeprecatedTemplateTest
Tests that the deprecated template is correctly marked.

Namespace

Drupal\Tests\system\Functional\Module

Code

public function testDeprecatedTemplate() : void {
    $this->expectDeprecation('The "deprecated-template.html.twig" template is deprecated in drupal:X.0.0 and is removed from drupal:Y.0.0. Use another template instead. See https://www.example.com');
    $this->drupalGet('/deprecated-twig-template');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.