public function testCanRespondToNonAjaxRequestFromOkResponseBuilder()
{
$this->request = $this->prepareHttpRequest('foo/bar/baz', 'GET');
$this->createService();
elgg_register_page_handler('foo', function ($segments, $identifier) {
$this->assertEquals(['bar', 'baz'], $segments);
$this->assertEquals('foo', $identifier);
return elgg_ok_response('hello');
});
$this->assertTrue($this->route());
$response = _elgg_services()->responseFactory->getSentResponse();
$this->assertInstanceOf(Response::class, $response);
$this->assertEquals(ELGG_HTTP_OK, $response->getStatusCode());
$this->assertEquals('hello', $response->getContent());
}