1 | <?php |
||
13 | class ZipArchiveTest extends \PHPUnit_Framework_TestCase |
||
14 | { |
||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | private $tmpDir; |
||
19 | |||
20 | /** |
||
21 | * Create temporary directory, if exists removes it first. |
||
22 | */ |
||
23 | public function setUp() |
||
31 | |||
32 | /** |
||
33 | * Remove temporary directory. |
||
34 | */ |
||
35 | public function tearDown() |
||
40 | |||
41 | /** |
||
42 | * Tests if current file content is zipped. |
||
43 | * |
||
44 | * @throws \Exception |
||
45 | */ |
||
46 | public function testSimpleZipOfContent() |
||
58 | |||
59 | /** |
||
60 | * @expectedException \InvalidArgumentException |
||
61 | */ |
||
62 | public function testIfExceptionIsThrownWhenCompressedFileIsNotFound() |
||
74 | |||
75 | /** |
||
76 | * ZipArchive should throw exception if directory is not writable. |
||
77 | * |
||
78 | * @expectedException \Exception |
||
79 | */ |
||
80 | public function testThrowExceptionIfTempDirIsNotWritable() |
||
88 | |||
89 | /** |
||
90 | * Should return false if file is not zip. |
||
91 | */ |
||
92 | public function testShouldReturnFalseIfFileIsNotZip() |
||
101 | } |
||
102 |