| Total Complexity | 1 |
| Total Lines | 19 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class VolumeTest extends \CommonTestClass |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @throws MenuException |
||
| 15 | * @throws PathsException |
||
| 16 | */ |
||
| 17 | public function testGetFiles(): void |
||
| 18 | { |
||
| 19 | $lib = new EntriesSource\Volume($this->getTargetPath()); |
||
| 20 | $iter = $lib->getFiles([]); |
||
| 21 | $files = iterator_to_array($iter); |
||
| 22 | $this->assertNotEmpty($files); |
||
| 23 | $this->assertTrue(in_array('dummy4.htm', $files)); |
||
| 24 | $this->assertFalse(in_array('dummy5.htm', $files)); |
||
| 25 | |||
| 26 | $iter2 = $lib->getFiles(['dummy3']); |
||
| 27 | $files2 = iterator_to_array($iter2); |
||
| 28 | $this->assertFalse(in_array('dummy4.htm', $files2)); |
||
| 29 | $this->assertTrue(in_array('dummy5.htm', $files2)); |
||
| 30 | } |
||
| 32 |