| @@ 468-475 (lines=8) @@ | ||
| 465 | $this->assertTrue($this->klein_app->response()->isLocked()); |
|
| 466 | } |
|
| 467 | ||
| 468 | public function testOptions() |
|
| 469 | { |
|
| 470 | $route = $this->klein_app->options($this->getTestCallable()); |
|
| 471 | ||
| 472 | $this->assertNotNull($route); |
|
| 473 | $this->assertTrue($route instanceof Route); |
|
| 474 | $this->assertSame('OPTIONS', $route->getMethod()); |
|
| 475 | } |
|
| 476 | ||
| 477 | public function testHead() |
|
| 478 | { |
|
| @@ 477-484 (lines=8) @@ | ||
| 474 | $this->assertSame('OPTIONS', $route->getMethod()); |
|
| 475 | } |
|
| 476 | ||
| 477 | public function testHead() |
|
| 478 | { |
|
| 479 | $route = $this->klein_app->head($this->getTestCallable()); |
|
| 480 | ||
| 481 | $this->assertNotNull($route); |
|
| 482 | $this->assertTrue($route instanceof Route); |
|
| 483 | $this->assertSame('HEAD', $route->getMethod()); |
|
| 484 | } |
|
| 485 | ||
| 486 | public function testGet() |
|
| 487 | { |
|
| @@ 486-493 (lines=8) @@ | ||
| 483 | $this->assertSame('HEAD', $route->getMethod()); |
|
| 484 | } |
|
| 485 | ||
| 486 | public function testGet() |
|
| 487 | { |
|
| 488 | $route = $this->klein_app->get($this->getTestCallable()); |
|
| 489 | ||
| 490 | $this->assertNotNull($route); |
|
| 491 | $this->assertTrue($route instanceof Route); |
|
| 492 | $this->assertSame('GET', $route->getMethod()); |
|
| 493 | } |
|
| 494 | ||
| 495 | public function testPost() |
|
| 496 | { |
|
| @@ 495-502 (lines=8) @@ | ||
| 492 | $this->assertSame('GET', $route->getMethod()); |
|
| 493 | } |
|
| 494 | ||
| 495 | public function testPost() |
|
| 496 | { |
|
| 497 | $route = $this->klein_app->post($this->getTestCallable()); |
|
| 498 | ||
| 499 | $this->assertNotNull($route); |
|
| 500 | $this->assertTrue($route instanceof Route); |
|
| 501 | $this->assertSame('POST', $route->getMethod()); |
|
| 502 | } |
|
| 503 | ||
| 504 | public function testPut() |
|
| 505 | { |
|
| @@ 504-511 (lines=8) @@ | ||
| 501 | $this->assertSame('POST', $route->getMethod()); |
|
| 502 | } |
|
| 503 | ||
| 504 | public function testPut() |
|
| 505 | { |
|
| 506 | $route = $this->klein_app->put($this->getTestCallable()); |
|
| 507 | ||
| 508 | $this->assertNotNull($route); |
|
| 509 | $this->assertTrue($route instanceof Route); |
|
| 510 | $this->assertSame('PUT', $route->getMethod()); |
|
| 511 | } |
|
| 512 | ||
| 513 | public function testDelete() |
|
| 514 | { |
|
| @@ 513-520 (lines=8) @@ | ||
| 510 | $this->assertSame('PUT', $route->getMethod()); |
|
| 511 | } |
|
| 512 | ||
| 513 | public function testDelete() |
|
| 514 | { |
|
| 515 | $route = $this->klein_app->delete($this->getTestCallable()); |
|
| 516 | ||
| 517 | $this->assertNotNull($route); |
|
| 518 | $this->assertTrue($route instanceof Route); |
|
| 519 | $this->assertSame('DELETE', $route->getMethod()); |
|
| 520 | } |
|
| 521 | ||
| 522 | public function testPatch() |
|
| 523 | { |
|
| @@ 522-529 (lines=8) @@ | ||
| 519 | $this->assertSame('DELETE', $route->getMethod()); |
|
| 520 | } |
|
| 521 | ||
| 522 | public function testPatch() |
|
| 523 | { |
|
| 524 | $route = $this->klein_app->patch($this->getTestCallable()); |
|
| 525 | ||
| 526 | $this->assertNotNull($route); |
|
| 527 | $this->assertTrue($route instanceof Route); |
|
| 528 | $this->assertSame('PATCH', $route->getMethod()); |
|
| 529 | } |
|
| 530 | } |
|
| 531 | ||