public function testCanRespondToAjaxViewRequestForARegisteredFormView()
{
$vars = ['query_value' => 'hello'];
$this->request = $this->prepareHttpRequest('ajax/form/query_view', 'GET', $vars, 1);
$this->createService();
elgg_register_ajax_view('forms/query_view');
$this->route();
$response = _elgg_services()->responseFactory->getSentResponse();
$this->assertInstanceOf(Response::class, $response);
$this->assertEquals(ELGG_HTTP_OK, $response->getStatusCode());
$this->assertEquals(elgg_view_form('query_view', [], $vars), $response->getContent());
$this->assertContains('text/html', $response->headers->get('Content-Type'));
$this->assertContains('charset=utf-8', strtolower($response->headers->get('Content-Type')));
}