public function testApiSubRoute()
 {
     $testRouteGetList = '/api/v1/model/getList';
     $testRouteFindOne = '/api/v1/model/findOne/123';
     $expectedResultGetList = ['route' => '/api/v1/model/:method[/:id]', 'namespace' => '', 'controller' => 'Rest\\Controllers\\ModelController', 'action' => 'methodAction', 'params' => ['method' => 'getList', 'id' => null], 'defaults' => []];
     $this->assertEquals($expectedResultGetList, $this->router->getMatchedConfiguration($testRouteGetList));
     $expectedResultFindOne = ['route' => '/api/v1/model/:method[/:id]', 'namespace' => '', 'controller' => 'Rest\\Controllers\\ModelController', 'action' => 'methodAction', 'params' => ['method' => 'findOne', 'id' => 123], 'defaults' => []];
     $this->assertEquals($expectedResultFindOne, $this->router->getMatchedConfiguration($testRouteFindOne));
 }
 public function testShouldThrowExceptionWhenNoMethodMatch()
 {
     $request = new HttpRequest('/http/25', HttpRequest::METHOD_CONNECT);
     $result = $this->router->getMatchedConfiguration($request);
     $this->assertEquals(false, $result);
 }