Skip to content

Commit 89bf016

Browse files
committed
Fix testItReturnsBodyFromStream and ignore getInput test
1 parent 64f128e commit 89bf016

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

src/Mta.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ public function getResource(string $resourceName): MtaResource
8181
return $resource;
8282
}
8383

84+
85+
/**
86+
* @codeCoverageIgnore
87+
*/
8488
public static function getInput(): ?array
8589
{
8690
return Translator::fromServer(Input::get())?? null;

src/Utils/Input.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616

1717
abstract class Input
1818
{
19+
/**
20+
* @codeCoverageIgnore
21+
*/
1922
public static function get(): ?string
2023
{
2124
$input = file_get_contents('php://input');

tests/Unit/HandleResponseTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ public function testItReturnsBody(): void
3030

3131
public function testItReturnsBodyFromStream(): void
3232
{
33-
$response = $this->createMock(ResponseInterface::class);
34-
$response->method('getBody')->willReturn('someBody');
3533
$stream = $this->createMock(StreamInterface::class);
3634
$stream->method('getContents')->willReturn('someBody');
35+
$response = $this->createMock(ResponseInterface::class);
36+
$response->method('getBody')->willReturn($stream);
3737
$this->assertEquals('someBody', HandleResponse::getBody($response));
3838
}
3939
}

0 commit comments

Comments
 (0)