public function archiveDumpCase::testArchiveDumpNoCore

8.0.x archiveDumpTest.php public archiveDumpCase::testArchiveDumpNoCore()
6.x archiveDumpTest.php public archiveDumpCase::testArchiveDumpNoCore()
7.x archiveDumpTest.php public archiveDumpCase::testArchiveDumpNoCore()
5.x archiveDumpTest.php public archiveDumpCase::testArchiveDumpNoCore()
master archiveDumpTest.php public archiveDumpCase::testArchiveDumpNoCore()

Test if tarball generated by archive-dump with --no-core looks right.

File

tests/archiveDumpTest.php, line 105

Namespace

Unish

Class

archiveDumpCase
Tests for archive-dump and archive-restore

Code

public function testArchiveDumpNoCore() {
  $dump_dest = $this->archiveDump(TRUE);
  $untar_dest = $this->unTar($dump_dest);
  $docroot = basename($this->webroot());
  $this->assertFileExists($untar_dest . '/MANIFEST.ini');
  $this->assertFileExists($untar_dest . '/' . $docroot);
  $modules_dir = UNISH_DRUPAL_MAJOR_VERSION >= 8 ? '/core/modules' : '/modules';
  $this->assertFileNotExists($untar_dest . '/' . $docroot . $modules_dir, 'No modules directory should exist with --no-core');

  return $dump_dest;
}