Example #1
0
 public function testAllMethods()
 {
     $A = $B = $C = $D = $E = $F = $G = $H = $I = true;
     $route = new Route('/', [$A]);
     $route->get($B, $C)->post($C, $D)->put($D, $E)->delete($E, $F)->patch($F, $G)->options($G, $H)->head($H, $I);
     $this->assertSame(['/' => ['GET' => [$A, $B, $C], 'POST' => [$A, $C, $D], 'PUT' => [$A, $D, $E], 'DELETE' => [$A, $E, $F], 'PATCH' => [$A, $F, $G], 'OPTIONS' => [$A, $G, $H], 'HEAD' => [$A, $H, $I]]], $route->dump());
 }