function ComponentNodeVisitorTest::testOtherVisitorsCanModifyTwigNodes
Same name in this branch
- 10 core/modules/sdc/tests/src/Kernel/ComponentNodeVisitorTest.php \Drupal\Tests\sdc\Kernel\ComponentNodeVisitorTest::testOtherVisitorsCanModifyTwigNodes()
Same name in other branches
- 11.x core/modules/sdc/tests/src/Kernel/ComponentNodeVisitorTest.php \Drupal\Tests\sdc\Kernel\ComponentNodeVisitorTest::testOtherVisitorsCanModifyTwigNodes()
- 11.x core/tests/Drupal/KernelTests/Components/ComponentNodeVisitorTest.php \Drupal\KernelTests\Components\ComponentNodeVisitorTest::testOtherVisitorsCanModifyTwigNodes()
Test that other visitors can modify Twig nodes.
File
-
core/
tests/ Drupal/ KernelTests/ Components/ ComponentNodeVisitorTest.php, line 30
Class
- ComponentNodeVisitorTest
- Tests the node visitor.
Namespace
Drupal\KernelTests\ComponentsCode
public function testOtherVisitorsCanModifyTwigNodes() : void {
$build = [
'#type' => 'inline_template',
'#template' => "{% embed('sdc_theme_test_base:my-card-no-schema') %}{% block card_body %}Foo bar{% endblock %}{% endembed %}",
];
$this->renderComponentRenderArray($build);
// If this is reached, the test passed.
$this->assertTrue(TRUE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.