Example #1
0
 /**
  * @test
  */
 public function match_withValidator_returnFalse()
 {
     $route = new Route('/name/:first/:last');
     $route->getUrlParams()->setValidator(new Validator(['first' => function () {
         return false;
     }]));
     $this->assertFalse($route->match('/name/first/last'));
     $this->assertNotEmpty($route->getError());
 }