| Total Complexity | 3 |
| Total Lines | 58 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | abstract class BoolResultTestClass extends BaseRouterUnitTestClass |
||
| 12 | { |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Default setup |
||
| 16 | * |
||
| 17 | * {@inheritdoc} |
||
| 18 | * @see TestCase::setUp() |
||
| 19 | */ |
||
| 20 | public function setUp(): void |
||
| 21 | { |
||
| 22 | $_SERVER['REQUEST_METHOD'] = 'GET'; |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Data provider for the test testBoolResult |
||
| 27 | * |
||
| 28 | * @return array testing data |
||
| 29 | */ |
||
| 30 | public function boolResultDataProvider(): array |
||
| 44 | ] |
||
| 45 | ]; |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Testing bool return values for route handlers, checking that false return value works correctly |
||
| 50 | * |
||
| 51 | * @param callable $handler |
||
| 52 | * route handler |
||
| 53 | * @param bool $expected |
||
| 54 | * expected result |
||
| 55 | * @dataProvider boolResultDataProvider |
||
| 56 | */ |
||
| 57 | public function testBoolResult(callable $handler, bool $expected): void |
||
| 71 |