Example #1
0
 public function testRouteConditionDollarSignMeaning()
 {
     /*//
     	test that the ($) {$} shortcuts mean match any strings between slashes.
     	//*/
     $router = new Nether\Avenue\Router(static::$RequestData['TestDeep']);
     $router->AddRoute('{@}//test/($)', 'herp::derp');
     (new Verify($router->GetRoute()))->false();
     ////////
     $router = new Nether\Avenue\Router(static::$RequestData['TestDeep']);
     $router->AddRoute('{@}//($)', 'herp::derp');
     (new Verify($router->GetRoute()))->false();
     $router->ClearRoutes()->AddRoute('{@}//($)/($)/($)/($)', 'herp::derp');
     (new Verify($router->GetRoute()->GetArgv()[0]))->equals('one');
     (new Verify($router->GetRoute()->GetArgv()[1]))->equals('two');
     (new Verify($router->GetRoute()->GetArgv()[2]))->equals('three');
     (new Verify($router->GetRoute()->GetArgv()[3]))->equals('four');
     return;
 }