From 1e2c61291e61f3b565ff39d855d4c67c89237fe0 Mon Sep 17 00:00:00 2001 From: Dave Smith-Hayes Date: Tue, 29 Apr 2025 02:56:57 +0000 Subject: [PATCH] Assert the content type of the async handler works fine. --- app/tests/Handler/AsyncHandlerTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/tests/Handler/AsyncHandlerTest.php b/app/tests/Handler/AsyncHandlerTest.php index 3280b9b..1038afe 100644 --- a/app/tests/Handler/AsyncHandlerTest.php +++ b/app/tests/Handler/AsyncHandlerTest.php @@ -30,10 +30,12 @@ class AsyncHandlerTest extends TestCase $response = $app->handle($request); $this->assertStringContainsString('
  • 1
  • ', $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]); } }