Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | public function testFileRender() |
||
15 | { |
||
16 | $this->app->getBootloader()->bootload([FileSnapshotterBootloader::class]); |
||
17 | |||
18 | $snapshot = $this->makeSnapshot('File error', 123); |
||
19 | /** @var DelegateSnapshot $delegate */ |
||
20 | $delegate = $this->factory->make(DelegateSnapshot::class, [ |
||
|
|||
21 | 'exception' => $snapshot->getException() |
||
22 | ]); |
||
23 | |||
24 | $this->assertEmpty($this->files->getFiles(directory('runtime') . 'logs/')); |
||
25 | $this->assertEmpty($this->files->getFiles(directory('runtime') . 'snapshots/')); |
||
26 | |||
27 | $delegate->report(); |
||
28 | |||
29 | $this->assertNotEmpty($this->files->getFiles(directory('runtime') . 'logs/')); |
||
30 | $this->assertNotEmpty($this->files->getFiles(directory('runtime') . 'snapshots/')); |
||
31 | } |
||
32 | } |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.