public function siteInstallD6Case::testExtraConfigurationOptions

8.0.x siteIntallD6Test.php public siteInstallD6Case::testExtraConfigurationOptions()
6.x siteIntallD6Test.php public siteInstallD6Case::testExtraConfigurationOptions()
7.x siteIntallD6Test.php public siteInstallD6Case::testExtraConfigurationOptions()
5.x siteIntallD6Test.php public siteInstallD6Case::testExtraConfigurationOptions()

File

tests/siteIntallD6Test.php, line 21

Class

siteInstallD6Case

Code

public function testExtraConfigurationOptions() {
  // Set up codebase without installing Drupal.
  $sites = $this->setUpDrupal(1, FALSE, '6');
  $root = $this->webroot();
  $site = key($sites);

  // Copy the "example" test profile into the newly created site's profiles directory
  $profile_dir = "$root/profiles/example";
  mkdir($profile_dir);
  copy(dirname(__FILE__) . '/resources/example.profile', $profile_dir . '/example.profile');

  $test_string = $this->randomString();
  // example.profile Has values 0-2 defined as allowed.
  $test_int = rand(0, 2);
  $site_name = $this->randomString();

  $this->drush('site-install', array(
    
    // First argument is the profile name
    'example',
    
    // Then the extra profile options
    "myopt1=$test_string",
    "myopt2=$test_int",
  ), array(
    'db-url' => $this->db_url($site),
    'yes' => NULL,
    'sites-subdir' => $site,
    'root' => $root,
    'site-name' => $site_name,
    'uri' => $site,
  ));

  $this->checkVariable('site_name', $site_name, $site);
  $this->checkVariable('myopt1', $test_string, $site);
  $this->checkVariable('myopt2', $test_int, $site);
}