Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function testApplyRequest() |
||
28 | { |
||
29 | $requestA = clone $this->request; |
||
30 | $requestB = clone $requestA; |
||
31 | |||
32 | $this->request->shouldReceive('withHeader')->once()->with('Accept-Encoding', 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3')->andReturn($requestA); |
||
33 | $requestA->shouldReceive('withHeader')->once()->with('Content-Type', 'application/json')->andReturn($requestB); |
||
34 | |||
35 | $this->assertSame($requestB, $this->middleware->applyRequest($this->request, [])); |
||
36 | } |
||
37 | |||
43 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: