function makeMakefileCase::testMakeOptionsProject

8.0.x makeTest.php makeMakefileCase::testMakeOptionsProject()
6.x makeTest.php makeMakefileCase::testMakeOptionsProject()
7.x makeTest.php makeMakefileCase::testMakeOptionsProject()
master makeTest.php makeMakefileCase::testMakeOptionsProject()

Test per project working-copy option.

File

tests/makeTest.php, line 560

Namespace

Unish

Class

makeMakefileCase
Make makefile tests. @group make @group slow

Code

function testMakeOptionsProject() {
  // Use the options-project.make file.
  $config = $this->getMakefile('options-project');

  $makefile_path = dirname(__FILE__) . '/makefiles';
  $options = array('no-core' => NULL);
  $makefile = $makefile_path . '/' . $config['makefile'];
  $install_directory = UNISH_SANDBOX . '/options-project';
  $this->drush('make', array($makefile, $install_directory), $options);

  // Test context_admin .git/HEAD file.
  $this->assertFileExists($install_directory . '/sites/all/modules/context_admin/.git/HEAD');
  $contents = file_get_contents($install_directory . '/sites/all/modules/context_admin/.git/HEAD');
  $this->assertContains('eb9f05e', $contents);

  // Test cck_signup .git/HEAD file does not exist.
  $this->assertFileNotExists($install_directory . '/sites/all/modules/cck_signup/.git/HEAD');

  // Test caption_filter .git/HEAD file.
  $this->assertFileExists($install_directory . '/sites/all/modules/contrib/caption_filter/.git/HEAD');
  $contents = file_get_contents($install_directory . '/sites/all/modules/contrib//caption_filter/.git/HEAD');
  $this->assertContains('c9794cf', $contents);
}