mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
test: add spark routes
test for route with regexp
This commit is contained in:
parent
19d5755cbc
commit
6107a60591
@ -240,4 +240,18 @@ final class RoutesTest extends CIUnitTestCase
|
||||
EOL;
|
||||
$this->assertStringContainsString($expected, $this->getBuffer());
|
||||
}
|
||||
|
||||
public function testRoutesCommandRouteWithRegexp(): void
|
||||
{
|
||||
$routes = Services::routes();
|
||||
$routes->resetRoutes();
|
||||
$routes->options('picker/(.+)', 'Options::index');
|
||||
|
||||
command('routes');
|
||||
|
||||
$expected = <<<'EOL'
|
||||
| OPTIONS | picker/(.+) | » | \App\Controllers\Options::index | <unknown> | <unknown> |
|
||||
EOL;
|
||||
$this->assertStringContainsString($expected, $this->getBuffer());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user