function FakeTemplateWrapper::render

Same name in other branches
  1. 8.9.x core/modules/help_topics/tests/src/Unit/HelpTopicTwigTest.php \Drupal\Tests\help_topics\Unit\FakeTemplateWrapper::render()

Mocks the \Twig\TemplateWrapper render() method.

Parameters

array $context: (optional) Render context.

File

core/modules/help_topics/tests/src/Unit/HelpTopicTwigTest.php, line 137

Class

FakeTemplateWrapper
Defines a fake template class to mock \Twig\TemplateWrapper.

Namespace

Drupal\Tests\help_topics\Unit

Code

public function render(array $context = []) {
    return $this->body;
}

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