From bc240a9fdb0cf319ee9d8e174b6e7ebb46f16974 Mon Sep 17 00:00:00 2001 From: Gemorroj Date: Fri, 12 Feb 2021 14:07:41 +0300 Subject: [PATCH] test: add test for #24 --- tests/EntryTest.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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)); + } }