Commit f924ac91 authored by Igor Wiedler's avatar Igor Wiedler

add test for Application::getControllerCollection()

parent 61e3ece6
......@@ -97,4 +97,20 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
$application->getControllerCollection()->flush();
$this->assertEquals(2, count($routeCollection->all()));
}
public function testGetControllerCollection()
{
$application = new Application();
$application->get('/foo', function() {
return 'foo';
});
$application->get('/bar', function() {
return 'bar';
});
$controllerCollection = $application->getControllerCollection();
$this->assertInstanceOf('Silex\ControllerCollection', $controllerCollection);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment