Total Complexity | 2 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
11 | class UriMatcherTest extends TestCase |
||
12 | { |
||
13 | /** |
||
14 | * @dataProvider provideCases |
||
15 | */ |
||
16 | public function testMatchesUri( |
||
17 | string $uri, |
||
18 | string $resourcePath, |
||
19 | string $operationPath, |
||
20 | bool $isMatch, |
||
21 | ?string $id |
||
22 | ): void { |
||
23 | $result = UriMatcher::matchUri($uri, $resourcePath, $operationPath, $matches); |
||
24 | |||
25 | $this->assertSame($isMatch, $result); |
||
26 | $this->assertSame($id, $matches['id'] ?? null); |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @return \Generator<array> |
||
31 | */ |
||
32 | public function provideCases(): \Generator |
||
56 | ]; |
||
57 | } |
||
59 |