Skip to content

Commit

Permalink
Add unit test for merging multiple route configurations.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roel van Duijnhoven committed Jun 10, 2013
1 parent 3a223cc commit e1594ec
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/AsseticBundleTest/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,28 @@ public function testGetRouter() {
$this->assertEquals($expected, $result);
}

public function testMergeMultipleRouteMatches() {
$this->object->setRoutes(array(
'bar' => array(
'@a',
'@d'
),
'foo.*' => array(
'@a',
'@b'
),
'foo/bar' => array(
'@c'
)
));

$assets = $this->object->getRoute('foo/bar');
$this->assertCount(3, $assets);
$this->assertContains('@a', $assets);
$this->assertContains('@b', $assets);
$this->assertContains('@c', $assets);
}

public function testGetControllers() {
$expected = array();
$result = $this->object->getControllers();
Expand Down

0 comments on commit e1594ec

Please sign in to comment.