Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
7 / 7 |
|
100.00% |
3 / 3 |
CRAP | |
100.00% |
1 / 1 |
| GetPrimitiveField | |
100.00% |
7 / 7 |
|
100.00% |
3 / 3 |
3 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| assertResponseValue | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Apie\IntegrationTests\Requests\JsonFields; |
| 4 | |
| 5 | use PHPUnit\Framework\TestCase; |
| 6 | |
| 7 | class GetPrimitiveField implements JsonSetFieldInterface |
| 8 | { |
| 9 | public function __construct( |
| 10 | private readonly string $name, |
| 11 | private readonly mixed $output |
| 12 | ) { |
| 13 | } |
| 14 | |
| 15 | public function getName(): string |
| 16 | { |
| 17 | return $this->name; |
| 18 | } |
| 19 | |
| 20 | public function assertResponseValue(mixed $responseValue): void |
| 21 | { |
| 22 | TestCase::assertEquals( |
| 23 | $this->output, |
| 24 | $responseValue, |
| 25 | 'Field ' . $this->name . ' should contain this value' |
| 26 | ); |
| 27 | } |
| 28 | } |