Extends
lithium\test\Unit
Tests correct regex backtracking.
Source
public function testValidPatternGeneration() {
$route = new Route(array(
'template' => '/posts/list/{:foobar:[0-9a-f]{5}}/todday/fooo',
'params' => array('controller' => 'posts', 'action' => 'archive')
));
$expected = '@^/posts/list(?:/(?P<foobar>[0-9a-f]{5}))/todday/fooo$@';
$result = $route->export();
$this->assertEqual($expected, $result['pattern']);
}