Assert the content type of the async handler works fine.
This commit is contained in:
parent
48e2b1fb18
commit
1e2c61291e
@ -30,10 +30,12 @@ class AsyncHandlerTest extends TestCase
|
||||
$response = $app->handle($request);
|
||||
|
||||
$this->assertStringContainsString('<li>1</li>', $response->getBody());
|
||||
$this->assertEquals("text/html", $response->getHeader('Content-Type')[0]);
|
||||
|
||||
$request = $this->createRequest('GET', '/test', [ 'Accept' => 'application/json']);
|
||||
$response = $app->handle($request);
|
||||
|
||||
$this->assertEquals('{"list":[1,2,3]}', $response->getBody());
|
||||
$this->assertEquals("application/json", $response->getHeader('Content-Type')[0]);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user