Skip to content

Commit

Permalink
Remove Broken Test (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
maennchen committed Nov 28, 2022
1 parent 8df0a40 commit 4f72456
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 35 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/part_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ jobs:
- php: "8.1"
os: windows-latest
experimental: false
# Not running on MacOS since it currently doesn't stop
# - php: 8.1
# os: macos-latest
# experimental: false
- php: 8.1
os: macos-latest
experimental: false

steps:
- name: Checkout Code
Expand Down
31 changes: 0 additions & 31 deletions test/ZipStreamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
*/
class ZipStreamTest extends TestCase
{
public const OSX_ARCHIVE_UTILITY =
'/System/Library/CoreServices/Applications/Archive Utility.app/Contents/MacOS/Archive Utility';

public function testFileNotFoundException(): void
{
$this->expectException(\ZipStream\Exception\FileNotFoundException::class);
Expand Down Expand Up @@ -222,34 +219,6 @@ public function testAddFileWithStorageMethod(): void
$zipArch->close();
}

public function testDecompressFileWithMacUnarchiver(): void
{
if (!file_exists(self::OSX_ARCHIVE_UTILITY)) {
$this->markTestSkipped('The Mac OSX Archive Utility is not available.');
}

[$tmp, $stream] = $this->getTmpFileStream();

$options = new ArchiveOptions();
$options->setOutputStream($stream);

$zip = new ZipStream(null, $options);

$folder = uniqid('', true);

$zip->addFile($folder . '/sample.txt', 'Sample Data');
$zip->finish();
fclose($stream);

exec(escapeshellarg(self::OSX_ARCHIVE_UTILITY) . ' ' . escapeshellarg($tmp), $output, $returnStatus);

$this->assertSame(0, $returnStatus);
$this->assertCount(0, $output);

$this->assertFileExists(dirname($tmp) . '/' . $folder . '/sample.txt');
$this->assertStringEqualsFile(dirname($tmp) . '/' . $folder . '/sample.txt', 'Sample Data');
}

public function testAddFileFromPath(): void
{
[$tmp, $stream] = $this->getTmpFileStream();
Expand Down

0 comments on commit 4f72456

Please sign in to comment.