/** * Tests the extract Method. * * @return void */ public function testExtractWithStreams() { if (!JArchiveBzip2::isSupported()) { $this->markTestSkipped('Bzip2 files can not be extracted.'); } $this->object->extract(__DIR__ . '/logo-bz2.png.bz2', $this->outputPath . '/logo-bz2.png', array('use_streams' => true)); $this->assertFileExists($this->outputPath . '/logo-bz2.png'); }
/** * Tests the extract Method. * * @group JArchive * @return JArchiveBzip2::extract */ public function testExtractWithStreams() { if (!JArchiveBzip2::isSupported()) { $this->markTestSkipped('Bzip2 files can not be extracted.'); return; } $this->object->extract(__DIR__ . '/logo.bz2', self::$outputPath . '/logo-bz2.png', array('use_streams' => true)); $this->assertTrue(is_file(self::$outputPath . '/logo-bz2.png')); if (is_file(self::$outputPath . '/logo-bz2.png')) { unlink(self::$outputPath . '/logo-bz2.png'); } }