/**
  * @test
  * @expectedException \InvalidArgumentException
  */
 public function willThrowAnExceptionWhenProvidingNotMatchingParams()
 {
     $paramValue = 'abc';
     $matcher = $this->createMock(Matcher::class);
     $matcher->expects($this->once())->method('__invoke')->with($paramValue)->will($this->returnValue(false));
     $this->router->addRoute(RouteBuilder::route()->get('/company/[:companyId]')->to('companyAction')->ifMatches('companyId', $matcher)->build());
     $this->router->generateUri('companyAction', ['companyId' => $paramValue]);
 }
 /**
  * @test
  * @expectedException \ConfigurationException
  */
 public function throwsAnExceptionIfTargetIsCallableAndAddedRouteHasNoNameDefined()
 {
     $this->router->addRoute(Route::get('/something')->to(function () {
         // do nothing
     }));
 }