{% for item in list %}
  • {{ item }}
  • {% endfor %} "; return $this->prepareResponse([ 'list' => [ 1, 2, 3 ]], $template); } }; $app = $this->getAppInstance(); $app->get('/test', $asyncHtmlHandler); $request = $this->createRequest('GET', '/test', [ 'Accept' => 'text/html' ]); $response = $app->handle($request); $this->assertStringContainsString('
  • 1
  • ', $response->getBody()); } }