public function RouteCollectionTest::testRoute in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/routing/Tests/RouteCollectionTest.php \Symfony\Component\Routing\Tests\RouteCollectionTest::testRoute()
File
- vendor/
symfony/ routing/ Tests/ RouteCollectionTest.php, line 20
Class
Namespace
Symfony\Component\Routing\TestsCode
public function testRoute() {
$collection = new RouteCollection();
$route = new Route('/foo');
$collection
->add('foo', $route);
$this
->assertEquals(array(
'foo' => $route,
), $collection
->all(), '->add() adds a route');
$this
->assertEquals($route, $collection
->get('foo'), '->get() returns a route by name');
$this
->assertNull($collection
->get('bar'), '->get() returns null if a route does not exist');
}