* * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace Polymorphine\Session\Tests\Doubles; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\StreamInterface; class DummyResponse implements ResponseInterface { public ?StreamInterface $stream; public function getProtocolVersion(): string { return '1.1'; } public function withProtocolVersion($version): self { return $this; } public function getHeaders(): array { return []; } public function hasHeader($name): bool { return false; } public function getHeader($name): array { return []; } public function getHeaderLine($name): string { return 'Header: data'; } public function withHeader($name, $value): self { return $this; } public function withAddedHeader($name, $value): self { return $this; } public function withoutHeader($name): self { return $this; } public function getBody(): StreamInterface { return $this->stream; } public function withBody(StreamInterface $body): self { return $this; } public function getStatusCode(): int { return 200; } public function withStatus($code, $reasonPhrase = ''): self { return $this; } public function getReasonPhrase(): string { return 'OK'; } }