File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,10 @@ public function getResource(string $resourceName): MtaResource
81
81
return $ resource ;
82
82
}
83
83
84
+
85
+ /**
86
+ * @codeCoverageIgnore
87
+ */
84
88
public static function getInput (): ?array
85
89
{
86
90
return Translator::fromServer (Input::get ())?? null ;
Original file line number Diff line number Diff line change 16
16
17
17
abstract class Input
18
18
{
19
+ /**
20
+ * @codeCoverageIgnore
21
+ */
19
22
public static function get (): ?string
20
23
{
21
24
$ input = file_get_contents ('php://input ' );
Original file line number Diff line number Diff line change @@ -30,10 +30,10 @@ public function testItReturnsBody(): void
30
30
31
31
public function testItReturnsBodyFromStream (): void
32
32
{
33
- $ response = $ this ->createMock (ResponseInterface::class);
34
- $ response ->method ('getBody ' )->willReturn ('someBody ' );
35
33
$ stream = $ this ->createMock (StreamInterface::class);
36
34
$ stream ->method ('getContents ' )->willReturn ('someBody ' );
35
+ $ response = $ this ->createMock (ResponseInterface::class);
36
+ $ response ->method ('getBody ' )->willReturn ($ stream );
37
37
$ this ->assertEquals ('someBody ' , HandleResponse::getBody ($ response ));
38
38
}
39
39
}
You can’t perform that action at this time.
0 commit comments