Exemplo n.º 1
0
 /**
  * Tests the extract Method.
  *
  * @return  void
  */
 public function testExtractWithStreams()
 {
     if (!JArchiveGzip::isSupported()) {
         $this->markTestSkipped('Gzip files can not be extracted.');
     }
     $this->object->extract(__DIR__ . '/logo-gz.png.gz', $this->outputPath . '/logo-gz.png', array('use_streams' => true));
     $this->assertTrue(is_file($this->outputPath . '/logo-gz.png'));
 }
Exemplo n.º 2
0
 /**
  * Tests the extract Method.
  *
  * @group   JArchive
  * @return  void
  */
 public function testExtract()
 {
     if (!JArchiveGzip::isSupported()) {
         $this->markTestSkipped('Gzip files can not be extracted.');
         return;
     }
     $this->object->extract(__DIR__ . '/logo.gz', self::$outputPath . '/logo-gz.png');
     $this->assertTrue(is_file(self::$outputPath . '/logo-gz.png'));
     if (is_file(self::$outputPath . '/logo-gz.png')) {
         unlink(self::$outputPath . '/logo-gz.png');
     }
 }