Skip to content

Commit 6107a60

Browse files
committed
test: add spark routes test for route with regexp
1 parent 19d5755 commit 6107a60

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/system/Commands/RoutesTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,4 +240,18 @@ public function testRoutesCommandRouteLegacy(): void
240240
EOL;
241241
$this->assertStringContainsString($expected, $this->getBuffer());
242242
}
243+
244+
public function testRoutesCommandRouteWithRegexp(): void
245+
{
246+
$routes = Services::routes();
247+
$routes->resetRoutes();
248+
$routes->options('picker/(.+)', 'Options::index');
249+
250+
command('routes');
251+
252+
$expected = <<<'EOL'
253+
| OPTIONS | picker/(.+) | » | \App\Controllers\Options::index | <unknown> | <unknown> |
254+
EOL;
255+
$this->assertStringContainsString($expected, $this->getBuffer());
256+
}
243257
}

0 commit comments

Comments
 (0)