Example #1
0
 public function testHiddenFormatWorksWithVariable()
 {
     $r = new Route('test', '/foo/:bar/:baz', 'foo', 'hello');
     $this->assertFalse($r->test($this->request('/foo/hello/world.json')));
     $this->assertTrue($r->test($this->request('/foo/hello/world')));
     $this->assertTrue($r->test($this->request('/foo/hello/world.html')));
     $expected = ['foo', 'hello', ['bar' => 'hello', 'baz' => 'world']];
     $this->assertSame($expected, $r->getControllerAction());
 }