Example #1
0
 public function testPlaceholderSubstitution()
 {
     // a route that matches a two-segment URI with the first segment being 'alpha'
     // and the second being used as the action
     $r = new Route('/alpha/{beta}', 'alpha/{beta}');
     $this->assertFalse($r->match('/beta/delta'));
     $this->assertTrue($r->match('/alpha/delta'));
     $this->assertEquals(['beta' => 'delta'], $r->args());
     $this->assertEquals('alpha/delta', $r->to());
 }