| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function testGetOutput() |
||
| 18 | { |
||
| 19 | $expected = [ |
||
| 20 | 'test.php' => [ |
||
| 21 | 3 => 'Magic number: 7', |
||
| 22 | 4 => 'Magic number: 12', |
||
| 23 | ], |
||
| 24 | 'test2.php' => [ |
||
| 25 | 3 => 'Magic number: 7', |
||
| 26 | 4 => 'Magic number: 12', |
||
| 27 | ], |
||
| 28 | ]; |
||
| 29 | |||
| 30 | $this->assertSame($expected, $this->mnd->getLines()); |
||
| 31 | } |
||
| 32 | |||
| 57 |
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: