tests/BodyParserTest.php 1 location
|
@@ 52-59 (lines=8) @@
|
| 49 |
|
* |
| 50 |
|
* @return void |
| 51 |
|
*/ |
| 52 |
|
public function testBodyParser(): void |
| 53 |
|
{ |
| 54 |
|
$delegate = new Delegate(); |
| 55 |
|
$parser = new BodyParser(); |
| 56 |
|
$parser->process($this->request, $delegate); |
| 57 |
|
$parsed = $delegate->getRequest(); |
| 58 |
|
$this->assertEquals(['hello' => 'world'], $parsed->getAttribute('body')); |
| 59 |
|
} |
| 60 |
|
} |
| 61 |
|
|
tests/RedirectTest.php 1 location
|
@@ 81-87 (lines=7) @@
|
| 78 |
|
* |
| 79 |
|
* @return void |
| 80 |
|
*/ |
| 81 |
|
public function testFailedRedirect(): void |
| 82 |
|
{ |
| 83 |
|
$delegate = new Delegate(); |
| 84 |
|
$redirect = new Redirect(); |
| 85 |
|
$response = $redirect->process($this->request, $delegate); |
| 86 |
|
$this->assertEquals(404, $response->getStatusCode()); |
| 87 |
|
} |
| 88 |
|
|
| 89 |
|
/** |
| 90 |
|
* Test a successful redirect request. |