function TwigWhiteListTest::testWhiteListChaining
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Theme/TwigWhiteListTest.php \Drupal\KernelTests\Core\Theme\TwigWhiteListTest::testWhiteListChaining()
- 10 core/tests/Drupal/KernelTests/Core/Theme/TwigWhiteListTest.php \Drupal\KernelTests\Core\Theme\TwigWhiteListTest::testWhiteListChaining()
- 11.x core/tests/Drupal/KernelTests/Core/Theme/TwigWhiteListTest.php \Drupal\KernelTests\Core\Theme\TwigWhiteListTest::testWhiteListChaining()
Tests white-listing of methods doesn't interfere with chaining.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Theme/ TwigWhiteListTest.php, line 124
Class
- TwigWhiteListTest
- Tests white-listing of entity properties.
Namespace
Drupal\KernelTests\Core\ThemeCode
public function testWhiteListChaining() {
$node = Node::create([
'type' => 'page',
'title' => 'Some node mmk',
'status' => 1,
'field_term' => $this->term
->id(),
]);
$node->save();
$this->setRawContent(twig_render_template(drupal_get_path('theme', 'test_theme') . '/templates/node.html.twig', [
'node' => $node,
]));
$this->assertText('Sometimes people are just jerks');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.