/** * tests unzip an archive with no destination specified * * @since 1.0 */ public function testUnzipNoDestination() { $reader = new Reader($this->path . 'test.zip'); $reader->unzip(); $files = array(); foreach (scandir($this->path) as $file) { $ext = pathinfo($file, PATHINFO_EXTENSION); if ($ext == 'txt') { $files[] = $file; } } $this->assertEquals(10, count($files)); }
public function testUnzipPhar() { $this->_deleteFiles(); $file = $this->path . 'test.tar'; $reader = new Reader($file); $reader->unzip(); $reader->unzip($this->path . 'test'); }