function TwigDeprecationsTest::testEmptyDeprecation
Test deprecation of empty variable triggers error.
File
- 
              core/tests/ Drupal/ KernelTests/ Core/ Theme/ TwigDeprecationsTest.php, line 76 
Class
- TwigDeprecationsTest
- Tests deprecating variables passed to twig templates.
Namespace
Drupal\KernelTests\Core\ThemeCode
public function testEmptyDeprecation() : void {
  $preprocess = [
    'foo' => '',
    'deprecations' => [
      'foo' => $this->getDeprecationMessage('foo'),
    ],
  ];
  $this->expectDeprecation($this->getDeprecationMessage('foo'));
  $this->assertRendered('|set_var|bar', $preprocess);
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
