/** * @expectedException Exception * @expectedExceptionMessage Route parameter "foo" must match pattern "\d+", given "foo". */ public function testGetRealPathFailedAssert() { $route = new Route("/hi/{foo}"); $route->assert('foo', '\\d+'); $actual = $route->getRealPath(['foo' => 'foo']); }