1 | <?php |
||
14 | final class TaggedResponse implements ResponseInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var Tag |
||
18 | */ |
||
19 | private $tag; |
||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | private $line; |
||
24 | |||
25 | /** |
||
26 | * TaggedResponse constructor. |
||
27 | * @param Tag $tag |
||
28 | * @param string $line |
||
29 | */ |
||
30 | public function __construct(Tag $tag, string $line) |
||
35 | |||
36 | /** |
||
37 | * @return string |
||
38 | */ |
||
39 | public function __toString(): string |
||
43 | |||
44 | /** |
||
45 | * @param string $data |
||
46 | * @return ResponseInterface |
||
47 | */ |
||
48 | public function withBody(string $data): ResponseInterface |
||
54 | |||
55 | /** |
||
56 | * @param CompletionResult $expectedResult |
||
57 | * @return ResponseInterface |
||
58 | * @throws AssertionFailedException |
||
59 | */ |
||
60 | public function assertCompletion(CompletionResult $expectedResult): ResponseInterface |
||
84 | |||
85 | /** |
||
86 | * @return ResponseInterface |
||
87 | * @throws AssertionFailedException |
||
88 | */ |
||
89 | public function assertContinuation(): ResponseInterface |
||
93 | |||
94 | /** |
||
95 | * @return ResponseInterface |
||
96 | */ |
||
97 | public function assertTagged(): ResponseInterface |
||
101 | |||
102 | /** |
||
103 | * @return string |
||
104 | */ |
||
105 | public function getBody(): string |
||
109 | } |