Skip to content

Commit 4393db1

Browse files
Add zip decompression test
1 parent 2d807c9 commit 4393db1

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tests/phpbu/App/Backup/Decompressor/FileTest.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,18 @@ class FileTest extends TestCase
2626
public function testDecompress()
2727
{
2828
$target = $this->createTargetMock('foo.gz', 'foo.gz');
29-
$dir = new File();
30-
$command = $dir->decompress($target);
29+
$file = new File();
30+
$command = $file->decompress($target);
3131

3232
$this->assertEquals('gzip -dk foo.gz', $command);
3333
}
34+
35+
public function testDecompressZip()
36+
{
37+
$target = $this->createTargetMock('foo.zip', 'foo.zip');
38+
$file = new File();
39+
$command = $file->decompress($target);
40+
41+
$this->assertEquals('unzip foo.zip', $command);
42+
}
3443
}

0 commit comments

Comments
 (0)