diff --git a/tests/EntryTest.php b/tests/EntryTest.php index 9cdbc17..029095a 100644 --- a/tests/EntryTest.php +++ b/tests/EntryTest.php @@ -55,4 +55,19 @@ public function testExtractTo(): void self::fail('Not catch expected exception'); } + + /** + * @see https://github.com/Gemorroj/Archive7z/pull/24 + */ + public function testDirectory(): void + { + $archive = new Archive7z($this->fixturesDir.'/7zip-18.05/test.tar'); + + $folder = $archive->getEntry('test'); + $ref = new \ReflectionObject($folder); + $property = $ref->getProperty('folder'); + $property->setAccessible(true); + + self::assertSame('+', $property->getValue($folder)); + } }