Conditions | 1 |
Paths | 1 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
39 | public function testJsonResponse() |
||
40 | { |
||
41 | $this->assertTrue(TestResponse::hasMacro('jsonResponse')); |
||
42 | |||
43 | $this->assertEquals(['foobar_foo' => 'foo', 'foobar_bar' => 212], $this->response->jsonResponse('foobar')); |
||
44 | |||
45 | $this->assertEquals(212, $this->response->jsonResponse('foobar.foobar_bar')); |
||
46 | } |
||
47 | } |
||
48 |
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: