public function testRequirement() { $route = new Route('/{foo}'); $route ->setRequirement('foo', '^\\d+$'); $this ->assertEquals('\\d+', $route ->getRequirement('foo'), '->setRequirement() removes ^ and $ from the path'); }