| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function testDate(): void |
||
| 18 | { |
||
| 19 | $lastDate = null; |
||
| 20 | $files = glob($this->filesDirectory() . DIRECTORY_SEPARATOR . '*'); |
||
| 21 | |||
| 22 | foreach ($files as $file) { |
||
| 23 | if (is_file($file)) { |
||
| 24 | $date = new \DateTime('@' . filemtime($file)); |
||
| 25 | if ($date > $lastDate) { |
||
| 26 | $lastDate = $date; |
||
| 27 | } |
||
| 28 | } |
||
| 29 | } |
||
| 30 | |||
| 31 | $inspector = new ModificationInspector(); |
||
| 32 | $this->assertEquals($lastDate, $inspector->getLastModifiedDate(new \ReflectionClass(Inspected::class))); |
||
| 33 | } |
||
| 34 | } |