/** * */ function test_child_not_matched() { $request = new Mvc5Request([Arg::URI => [Arg::PATH => '/foo/bar/bat']]); $dispatch = new Collection($this->config['routes']); $dispatch->service($this->app()); $this->assertNull($request->error()); /** @var Request $request */ $request = $dispatch($request); $this->assertEquals(new NotFound(), $request->error()); }
/** * */ function test_error() { $route = new Request([Arg::ERROR => 'foo']); $this->assertEquals('foo', $route->error()); }