Exemplo n.º 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());
 }
Exemplo n.º 2
0
 /**
  *
  */
 function test_vars()
 {
     $request = new Request([Arg::PARAMS => ['foo' => 'bar'], Arg::ARGS => ['bat' => 'baz'], Arg::DATA => ['dir' => 'asc']]);
     $this->assertEquals($request->params() + $request->args() + $request->data(), $request->vars());
 }