Example #1
0
 public function testArgsRegexNoDelimeter()
 {
     $r = new Route('test', '/website(/:site)');
     $r->controller('test')->action('index');
     $r->argsRegex('.*');
     $r->test($this->request('/website'));
     $this->assertSame(['test', 'index', []], $r->getControllerAction());
     $r->test($this->request('/website/http://foo.com/bar/baz'));
     $this->assertSame(['test', 'index', ['site' => 'http://foo.com/bar/baz']], $r->getControllerAction());
 }