1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-21 21:57:34 +02:00

Add a version filter to e_file_inspector::getPathIterator()

This commit is contained in:
Nick Liu
2020-03-23 13:37:46 -05:00
parent 0494000356
commit bb1c32489c
3 changed files with 28 additions and 5 deletions

View File

@@ -39,6 +39,15 @@ class e_file_inspectorTest extends \Codeception\Test\Unit
$this->assertNotEmpty($actualVersion);
}
public function testGetPathIterator()
{
$iterator = $this->e_integrity->getPathIterator();
$this->assertGreaterThanOrEqual(1, iterator_count($iterator));
$iterator = $this->e_integrity->getPathIterator("0.0.1-fakeNonExistentVersion");
$this->assertEquals(0, iterator_count($iterator));
}
public function testValidate()
{
$result = $this->e_integrity->validate("index.php");