$this->
assertEquals(['PUT'
],
$route->
getMethods(), 'The right route method was found.'
);
$exception_thrown = FALSE;
try { $provider->
getRouteByName('invalid_name'
);
} catch (RouteNotFoundException
$e) { $exception_thrown = TRUE;
} $this->
assertTrue($exception_thrown, 'Random route was not found.'
);
$routes =
$provider->
getRoutesByNames(['route_c', 'route_d',
$this->
randomMachineName()]);
$this->
assertCount(2,
$routes, 'Only two valid routes found.'
);
$this->
assertEquals('/path/two',
$routes['route_c'
]->
getPath());
$this->
assertEquals('/path/three',
$routes['route_d'
]->
getPath());
} /**
* Ensures that the routing system is capable of extreme long patterns.
*/
public function testGetRoutesByPatternWithLongPatterns() { $connection = Database::
getConnection();
$provider =
new TestRouteProvider($connection,
$this->state,
$this->currentPath,
$this->cache,
$this->pathProcessor,
$this->cacheTagsInvalidator, 'test_routes'
);