Example #1
0
 public function testDuplicateRouteNameException()
 {
     $this->expectException(\LogicException::class);
     $this->expectExceptionMessage('Route with name "test" already added');
     $rules = ['@test /test/:foo => test/info', '@fzz /fzz => test/fzz', '@test /foobar => /foo/bar', '/* => $uri'];
     $vfs = new \MicroVFS\Container();
     $vfs->set('router.rules', implode("\n", $rules));
     \MicroVFS\StreamWrapper::register('mvfs', $vfs);
     $router = Router::createFromRoutesFile('mvfs://router.rules');
 }