/**
  * Tests the extract Method.
  *
  * @group   JArchive
  * @return  void
  * @covers  JArchiveTar::extract
  */
 public function testExtract()
 {
     if (!JArchiveTar::isSupported()) {
         $this->markTestSkipped('Tar files can not be extracted.');
         return;
     }
     $this->object->extract(__DIR__ . '/logo.tar', self::$outputPath);
     $this->assertTrue(is_file(self::$outputPath . '/logo-tar.png'));
     if (is_file(self::$outputPath . '/logo-tar.png')) {
         unlink(self::$outputPath . '/logo-tar.png');
     }
 }
Example #2
0
 /**
  * Tests extracting TAR.
  *
  * @return  void
  */
 public function testExtractTar()
 {
     if (!JArchiveTar::isSupported()) {
         $this->markTestSkipped('Tar files can not be extracted.');
     }
     JArchive::extract(__DIR__ . '/logo.tar', $this->outputPath);
     $this->assertFileExists($this->outputPath . '/logo-tar.png');
 }
 /**
  * Tests extracting TAR.
  *
  * @group    JArchive
  * @covers    JArchive::extract
  * @return  void
  */
 public function testExtractTar()
 {
     if (!is_dir(self::$outputPath)) {
         $this->markTestSkipped("Couldn't create folder.");
         return;
     }
     if (!JArchiveTar::isSupported()) {
         $this->markTestSkipped('Tar files can not be extracted.');
         return;
     }
     JArchive::extract(__DIR__ . '/logo.tar', self::$outputPath);
     $this->assertTrue(is_file(self::$outputPath . '/logo-tar.png'));
     if (is_file(self::$outputPath . '/logo-tar.png')) {
         unlink(self::$outputPath . '/logo-tar.png');
     }
 }
Example #4
0
 /**
  * Tests the isSupported Method.
  *
  * @return  void
  */
 public function testIsSupported()
 {
     $this->assertTrue(JArchiveTar::isSupported());
 }