private function archiveDumpCase::unTar

8.0.x archiveDumpTest.php private archiveDumpCase::unTar($dump_dest)
6.x archiveDumpTest.php private archiveDumpCase::unTar($dump_dest)
7.x archiveDumpTest.php private archiveDumpCase::unTar($dump_dest)
5.x archiveDumpTest.php private archiveDumpCase::unTar($dump_dest)
master archiveDumpTest.php private archiveDumpCase::unTar($dump_dest)

Untar an archive and return the path to the untarred folder.

2 calls to archiveDumpCase::unTar()
archiveDumpCase::testArchiveDump in tests/archiveDumpTest.php
Test if tarball generated by archive-dump looks right.
archiveDumpCase::testArchiveDumpNoCore in tests/archiveDumpTest.php
Test if tarball generated by archive-dump with --no-core looks right.

File

tests/archiveDumpTest.php, line 41

Class

archiveDumpCase

Code

private function unTar($dump_dest) {
  $untar_dest = UNISH_SANDBOX . DIRECTORY_SEPARATOR . 'untar';
  unish_file_delete_recursive($untar_dest);
  $tar = self::get_tar_executable();
  $exec = sprintf("mkdir %s && cd %s && $tar -xzf %s", $untar_dest, $untar_dest, $dump_dest);
  $this->execute($exec);

  return $untar_dest;
}