private function getRouteCollection() {
$collection = new RouteCollection();
// defaults and requirements
$collection
->add('foo', new Route('/foo/{bar}', array(
'def' => 'test',
), array(
'bar' => 'baz|symfony',
)));
// defaults parameters in pattern
$collection
->add('foobar', new Route('/foo/{bar}', array(
'bar' => 'toto',
)));
// method requirement
$collection
->add('bar', new Route('/bar/{foo}', array(), array(
'_method' => 'GET|head',
)));
// method requirement (again)
$collection
->add('baragain', new Route('/baragain/{foo}', array(), array(
'_method' => 'get|post',
)));
// simple
$collection
->add('baz', new Route('/test/baz'));
// simple with extension
$collection
->add('baz2', new Route('/test/baz.html'));
// trailing slash
$collection
->add('baz3', new Route('/test/baz3/'));
// trailing slash with variable
$collection
->add('baz4', new Route('/test/{foo}/'));
// trailing slash and safe method
$collection
->add('baz5', new Route('/test/{foo}/', array(), array(
'_method' => 'get',
)));
// trailing slash and unsafe method
$collection
->add('baz5unsafe', new Route('/testunsafe/{foo}/', array(), array(
'_method' => 'post',
)));
// complex
$collection
->add('baz6', new Route('/test/baz', array(
'foo' => 'bar baz',
)));
// space in path
$collection
->add('baz7', new Route('/te st/baz'));
return $collection;
}