function DeployAdhocPlanTestCase::testDeployment in Deploy - Content Staging 7.2
Same name and namespace in other branches
- 7.3 modules/deploy_adhoc_plan/deploy_adhoc_plan.test \DeployAdhocPlanTestCase::testDeployment()
File
- modules/
deploy_adhoc_plan/ deploy_adhoc_plan.test, line 39 - Ad Hoc Deployment Plans module tests.
Class
- DeployAdhocPlanTestCase
- Test a full deployment with the ad hoc deployment functionality.
Code
function testDeployment() {
$adhoc_plan_name = $this
->randomName();
$user = $this
->drupalCreateUser(array(
'create deploy plan adhoc',
));
$this
->drupalLogin($user);
$this
->drupalGet('<front>', array(
'query' => array(
'deploy_adhoc_plan' => $adhoc_plan_name,
),
));
$template_plan = deploy_plan_load(variable_get('deploy_adhoc_plan_name'));
$adhoc_plan = deploy_plan_load($adhoc_plan_name);
$this
->assertTrue($template_plan->export_type == EXPORT_IN_CODE && !empty($adhoc_plan->pid) && $adhoc_plan->export_type == EXPORT_IN_DATABASE, 'Adhoc plan was successfully cloned.');
$this
->assertEqual(deploy_auto_plan_get_session(), $adhoc_plan_name, 'Auto plan session was initialized.');
$this
->runScenario($adhoc_plan_name);
}