Skip to content

Commit

Permalink
test: add test for #24
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemorroj committed Feb 12, 2021
1 parent ccf7519 commit bc240a9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/EntryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

0 comments on commit bc240a9

Please sign in to comment.