예제 #1
0
 /**
  *
  */
 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());
 }
예제 #2
0
파일: RequestTest.php 프로젝트: mvc5/tests
 /**
  *
  */
 function test_error()
 {
     $route = new Request([Arg::ERROR => 'foo']);
     $this->assertEquals('foo', $route->error());
 }