test/unit/Middleware/RequestFactoryMiddlewareTest.php 1 location
|
@@ 37-43 (lines=7) @@
|
| 34 |
|
$this->middleware = new RequestFactoryMiddleware($this->factory); |
| 35 |
|
} |
| 36 |
|
|
| 37 |
|
public function testApplyRequest() |
| 38 |
|
{ |
| 39 |
|
$newRequest = clone $this->request; |
| 40 |
|
$this->factory->shouldReceive('fromRequest')->once()->with($this->request)->andReturn($newRequest); |
| 41 |
|
|
| 42 |
|
$this->assertSame($newRequest, $this->middleware->applyRequest($this->request, [])); |
| 43 |
|
} |
| 44 |
|
|
| 45 |
|
public function testApplyResponse() |
| 46 |
|
{ |
test/unit/Middleware/ResponseFactoryMiddlewareTest.php 1 location
|
@@ 33-39 (lines=7) @@
|
| 30 |
|
$this->assertSame($this->request, $this->middleware->applyRequest($this->request, [])); |
| 31 |
|
} |
| 32 |
|
|
| 33 |
|
public function testApplyResponse() |
| 34 |
|
{ |
| 35 |
|
$newResponse = clone $this->response; |
| 36 |
|
$this->factory->shouldReceive('fromResponse')->once()->with($this->response)->andReturn($newResponse); |
| 37 |
|
|
| 38 |
|
$this->assertSame($newResponse, $this->middleware->applyResponse($this->request, $this->response, [])); |
| 39 |
|
} |
| 40 |
|
} |
| 41 |
|
|