| Total Complexity | 4 |
| Total Lines | 71 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class GetCallbackUnitTest extends TestCase |
||
| 14 | { |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Data provider for the |
||
| 18 | * |
||
| 19 | * @return array testing dataset |
||
| 20 | */ |
||
| 21 | public function getCallbackDataProvider(): array |
||
| 22 | { |
||
| 23 | return [ |
||
| 24 | [ |
||
| 25 | 'some-static-route', |
||
| 26 | 'some-static-route' |
||
| 27 | ], |
||
| 28 | [ |
||
| 29 | 'some/non-static/route/[i:id]', |
||
| 30 | 'some/non-static/route/1' |
||
| 31 | ], |
||
| 32 | [ |
||
| 33 | '*', |
||
| 34 | 'unexisting-route' |
||
| 35 | ] |
||
| 36 | ]; |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Testing getting callback |
||
| 41 | * |
||
| 42 | * @param string $route |
||
| 43 | * route |
||
| 44 | * @param string $url |
||
| 45 | * concrete URL |
||
| 46 | * @dataProvider getCallbackDataProvider |
||
| 47 | */ |
||
| 48 | public function testGetCallback(string $route, string $url): void |
||
| 65 | } |
||
| 66 | } |
||
| 67 | |||
| 68 | /** |
||
| 69 | * Testing case with unexisting callback |
||
| 70 | */ |
||
| 71 | public function testGetCallbackWithUnexistingRoute(): void |
||
| 84 | } |
||
| 85 | } |
||
| 86 |