function testSetStepConfig()
 {
     CMSWorkflowSiteConfigDecorator::set_step_config("threestep");
     $content = $this->readFile($this->workflowConfigPath);
     $this->assertEquals("STEP = threestep", $content);
     CMSWorkflowSiteConfigDecorator::set_step_config("");
     $content = $this->readFile($this->workflowConfigPath);
     $this->assertEquals("STEP = ", $content);
     CMSWorkflowSiteConfigDecorator::set_step_config("twostep");
     $content = $this->readFile($this->workflowConfigPath);
     $this->assertEquals("STEP = twostep", $content);
 }
 function setStepConfig()
 {
     $whichStep = Director::URLParam("ID");
     $validSteps = array('twostep', 'threestep');
     if (!in_array($whichStep, $validSteps)) {
         return false;
     }
     CMSWorkflowSiteConfigDecorator::set_step_config($whichStep);
     echo "<p>CMS Workflow has been set to <strong>{$whichStep}</strong></p>";
     // rebuild the database schema
     Director::redirect("dev/build?flush=1");
     return true;
 }