public function testTrimmingEmptyPathElements()
{
$route = new Route(array('template' => '/{:controller}/{:id:[0-9]+}', 'params' => array('action' => 'index', 'id' => null)));
$url = $route->match(array('controller' => 'posts', 'id' => '13'));
$this->assertEqual("/posts/13", $url);
$url = $route->match(array('controller' => 'posts'));
$this->assertEqual("/posts", $url);
}