protected function DeployWebTestCase::setUpSite in Deploy - Content Staging 7.2
Same name and namespace in other branches
- 7.3 deploy.test \DeployWebTestCase::setUpSite()
Set up a new site.
1 call to DeployWebTestCase::setUpSite()
- DeployWebTestCase::setUp in ./
deploy.test - Set up all sites.
File
- ./
deploy.test, line 76 - Deployment tests.
Class
- DeployWebTestCase
- Helper class.
Code
protected function setUpSite($key, $modules) {
static $original = array();
// How we can call parent::foo() changed in PHP 5.3.
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
call_user_func_array('parent::setUp', $modules);
}
else {
call_user_func_array(array(
$this,
'parent::setUp',
), $modules);
}
$this
->saveState($key);
variable_set('deploy_site_hash', md5(time()));
// Save original settings after first setUp(). We need to be able to restore
// them after subsequent calls to setUp().
if (empty($original)) {
$original = array(
$this->originalLanguage,
$this->originalLanguageDefault,
$this->originalFileDirectory,
$this->originalProfile,
$this->originalShutdownCallbacks,
);
}
// Restore the original settings.
list($this->originalLanguage, $this->originalLanguageDefault, $this->originalFileDirectory, $this->originalProfile, $this->originalShutdownCallbacks) = $original;
$this
->setUpSiteSpecifics($key);
}