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