public function testCanRespondToAjax2ViewRequestForARegisteredFormView()
{
$vars = ['query_value' => 'hello'];
$this->request = $this->prepareHttpRequest('ajax/form/query_view', 'GET', $vars, 2);
$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->assertContains('application/json', $response->headers->get('Content-Type'));
$output = json_encode(['value' => elgg_view_form('query_view', [], $vars), '_elgg_msgs' => (object) [], '_elgg_deps' => []], ELGG_JSON_ENCODING);
$this->assertEquals($output, $response->getContent());
}