'value']); $stream = new PsrStreamStub(); $psrResponse = new PsrResponseStub(); $helper = new Helper(); /** @var PsrResponseStub $resp */ $resp = $helper->toPsrResponse($result, $psrResponse, $stream); self::assertSame(json_encode($result), $resp->body->content); self::assertSame(['Content-Type' => ['application/json']], $resp->headers); } }