Example #1
0
 public function testMethodsWithMap()
 {
     $router = new Router();
     $this->assertEquals(0, $router->count());
     $this->assertEquals(0, count($router));
     $handler = function () {
         return "!!!";
     };
     $router->get('', $handler);
     $router->post('', $handler);
     $router->put('', $handler);
     $router->delete('', $handler);
     $router->options('', $handler);
     $this->assertEquals(5, $router->count());
     $this->assertEquals(5, count($router));
 }