Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
GetResourceApiCallDenied | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
2 | |
100.00% |
1 / 1 |
verifyValidResponse | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
2 |
1 | <?php |
2 | namespace Apie\IntegrationTests\Requests; |
3 | |
4 | use PHPUnit\Framework\TestCase; |
5 | use Psr\Http\Message\ResponseInterface; |
6 | |
7 | class GetResourceApiCallDenied extends GetResourceApiCall |
8 | { |
9 | public function verifyValidResponse(ResponseInterface $response): void |
10 | { |
11 | if ($this->faked) { |
12 | TestCase::assertContains($response->getStatusCode(), [200, 403]); |
13 | } else { |
14 | TestCase::assertEquals(403, $response->getStatusCode()); |
15 | } |
16 | } |
17 | } |