Beispiel #1
0
 private function M()
 {
     $cls = 'FruitTest\\RouteKit\\Handler';
     $mux = new Mux();
     $mux->get('/', array($cls, 'inj'));
     return $mux;
 }
Beispiel #2
0
 private function M($i, $o)
 {
     $cls = 'FruitTest\\RouteKit\\Handler';
     $mux = new Mux();
     $mux->setFilters($i, $o);
     $mux->get('/', array($cls, 'filter'));
     return $mux;
 }
 /**
  * @requires PHP 7
  * @expectedException Exception
  */
 public function testUnsupportedType()
 {
     $cls = 'FruitTest\\RouteKit\\Handler7';
     $mux = new Mux();
     $mux->get('/p/:', array($cls, 'params2'));
     $actual = $mux->dispatch('GET', '/p/a');
 }
Beispiel #4
0
 /**
  * @requires PHP 7
  * @expectedException Exception
  */
 public function testUnsopportedType()
 {
     $cls = 'FruitTest\\RouteKit\\Handler7';
     $mux = new Mux();
     $mux->get('/p/:', array($cls, 'params2'));
     $mux->compile();
 }
Beispiel #5
0
 public function setup(\Fruit\RouteKit\Mux $mux)
 {
     $mux->setInterceptor($this);
 }