BUGFIX Added setup/teardown methods to CMSMainTest to fix test breakages when used alongside cmsworkflow module (which unsets the public batch action)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@89864 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-10-21 19:57:47 +00:00
parent c481f24e7e
commit 022e3ee2ee

View File

@ -8,6 +8,26 @@ class CMSMainTest extends FunctionalTest {
protected $autoFollowRedirection = false;
static protected $orig = array();
static function set_up_once() {
self::$orig['CMSBatchActionHandler_batch_actions'] = CMSBatchActionHandler::$batch_actions;
CMSBatchActionHandler::$batch_actions = array(
'publish' => 'CMSBatchAction_Publish',
'unpublish' => 'CMSBatchAction_Unpublish',
'delete' => 'CMSBatchAction_Delete',
'deletefromlive' => 'CMSBatchAction_DeleteFromLive',
);
parent::set_up_once();
}
static function tear_down_once() {
CMSBatchActionHandler::$batch_actions = self::$orig['CMSBatchActionHandler_batch_actions'];
parent::tear_down_once();
}
/**
* @todo Test the results of a publication better
*/