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