public function RouteCollectionTest::testResource in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/routing/Tests/RouteCollectionTest.php \Symfony\Component\Routing\Tests\RouteCollectionTest::testResource()
File
- vendor/
symfony/ routing/ Tests/ RouteCollectionTest.php, line 175
Class
Namespace
Symfony\Component\Routing\TestsCode
public function testResource() {
$collection = new RouteCollection();
$collection
->addResource($foo = new FileResource(__DIR__ . '/Fixtures/foo.xml'));
$collection
->addResource($bar = new FileResource(__DIR__ . '/Fixtures/bar.xml'));
$collection
->addResource(new FileResource(__DIR__ . '/Fixtures/foo.xml'));
$this
->assertEquals(array(
$foo,
$bar,
), $collection
->getResources(), '->addResource() adds a resource and getResources() only returns unique ones by comparing the string representation');
}