mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 09:05:53 +00:00
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:
parent
c481f24e7e
commit
022e3ee2ee
@ -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
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user