Skip to content

Commit 25dae64

Browse files
committed
Fix test
1 parent 554e002 commit 25dae64

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎tests/TwigRuntimeExtensionTest.php‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,12 @@ protected function mapRouteCollectorRoute(
7070
public static function isCurrentUrlProvider(): array
7171
{
7272
return [
73-
['/hello/{name}', ['name' => 'world'], '/hello/world', '/base-path', true],
7473
['/hello/{name}', ['name' => 'world'], '/hello/world', '', true],
75-
['/hello/{name}', ['name' => 'world'], '/hello/john', '/base-path', false],
74+
['/hello/{name}', ['name' => 'world'], '/base-path/hello/world', '/base-path', true],
7675
['/hello/{name}', ['name' => 'world'], '/hello/john', '', false],
76+
['/hello/{name}', ['name' => 'world'], '/hello/world', '/base-path', false],
77+
['/hello/{name}', ['name' => 'world'], '/base-path/hello/john', '/base-path', false],
78+
['/hello/{name}', ['name' => 'world'], '/other/path', '/base-path', false],
7779
];
7880
}
7981

@@ -89,7 +91,7 @@ public static function isCurrentUrlProvider(): array
8991
#[DataProvider('isCurrentUrlProvider')]
9092
public function testIsCurrentUrl(string $pattern, array $data, string $path, ?string $basePath, bool $expected)
9193
{
92-
$routeCollector = $this->createRouteCollector($basePath);
94+
$routeCollector = $this->createRouteCollector('');
9395
$routeParser = $routeCollector->getRouteParser();
9496

9597
$routeName = 'route';

0 commit comments

Comments
 (0)