Example #1
0
 public function run()
 {
     $request = $this->getRequest();
     $response = new Response();
     $context = new Context($request, $response);
     $dispatcher = new FcDispatcher($this->getResolvers(), $context, '@404', '@error');
     $dispatcher->dispatch();
 }
Example #2
0
 public function testNamespaceResolver()
 {
     // when
     $context = $this->createContext("/bar/hello");
     $dispatcher = new FcDispatcher($this->chainReg, $context, '@404', '@error');
     $dispatcher->dispatch();
     // then
     $this->assertEquals($this->fooApp->called, 0);
     $this->assertEquals($this->barApp->called, 1);
 }