Skip to content

Commit

Permalink
add test for uniqueness of resources
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobion committed Mar 5, 2013
1 parent a0e66ba commit 3f6a67b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Tests/RouteCollectionTest.php
Expand Up @@ -184,7 +184,11 @@ public function testResource()

$collection = new RouteCollection();
$collection->addResource($foo = new FileResource(__DIR__.'/Fixtures/foo.xml'));
$this->assertEquals(array($foo), $collection->getResources(), '->addResources() adds a resource');
$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');
}

public function testUniqueRouteWithGivenName()
Expand Down

0 comments on commit 3f6a67b

Please sign in to comment.