| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | public function testInvoke() |
||
| 37 | { |
||
| 38 | $targetPath =$this->observer->getTargetPath(); |
||
| 39 | if (file_exists($targetPath)) { |
||
| 40 | unlink($targetPath); |
||
| 41 | } |
||
| 42 | $config = [ |
||
| 43 | 'markdown_cms' => [ |
||
| 44 | 'testKey' => 'testEntry' |
||
| 45 | ] |
||
| 46 | ]; |
||
| 47 | $this->observer->__invoke($config); |
||
| 48 | $this->assertFileExists($targetPath); |
||
| 49 | $this->assertEquals($config, include $targetPath); |
||
| 50 | } |
||
| 51 | } |
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.