function tearDown()
 {
     // delete the config file before begin the test
     $path = CMSWorkflowSiteConfigDecorator::get_config_file_path();
     if (file_exists($path)) {
         unlink(CMSWorkflowSiteConfigDecorator::get_config_file_path());
     }
     // Remove custom CMSWorkflow config file path
     CMSWorkflowSiteConfigDecorator::$config_file_path = '';
 }
 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;
 }
<?php

Member::add_extension('FrameworkTestRole');
Member::add_extension('FileUploadRole');
SiteTree::add_extension('FrameworkTestSiteTreeExtension');
File::add_extension('FrameworkTestFileExtension');
if (class_exists('SiteTreeCMSWorkflow')) {
    SiteConfig::add_extension('CMSWorkflowSiteConfigDecorator');
    CMSWorkflowSiteConfigDecorator::apply_active_config();
}
Director::addRules(100, array('dev/regress/$Action/$ID' => 'FrameworktestRegressSessionAdmin'));
if (@$_GET['db']) {
    $enabletranslatable = @$_GET['enabletranslatable'];
} elseif (@$_SESSION['db']) {
    $enabletranslatable = @$_SESSION['enabletranslatable'];
} else {
    $enabletranslatable = null;
}
if ($enabletranslatable) {
    SiteTree::add_extension('Translatable');
    SiteConfig::add_extension('Translatable');
}