Example #1
0
 public function testApplicationEncapsulation2()
 {
     $route = new Router(file);
     $route->setApplication('foo');
     $req = Request::create('/prefix1/apps/foo');
     $this->assertEquals('foobar', $route->doRoute($req));
 }
Example #2
0
 /**
  *  @depends testCompile
  */
 public function testLast()
 {
     $route = new Router(xfile);
     $req = Request::create('/buffer');
     $req->attributes->set('phpunit', $this);
     $route->doRoute($req);
     $this->assertEquals($req->attributes->get('__buffer__'), "Hi there!\n");
     $this->assertTrue($req->attributes->get('last_for_all'));
 }