public function testGetRawBodyReturnsStringWhenJson() { $json = json_encode(['message' => 'success', 'data' => ['test' => true]]); $response = new Response(200, [], $json); $this->assertTrue(is_string($response->getRawBody())); $this->assertEquals($json, $response->getRawBody()); }