mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR: Make CMSMainTest compatible with cmsworkflow module. (from r89030) (from r96794)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@102484 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
63efbf372b
commit
444e192068
@ -40,11 +40,14 @@ class CMSMainTest extends FunctionalTest {
|
||||
$response->getBody()
|
||||
);
|
||||
|
||||
// Some modules (e.g., cmsworkflow) will remove this action
|
||||
if(isset(CMSBatchActionHandler::$batch_actions['publish'])) {
|
||||
$response = Director::test("admin/cms/batchactions/publish", array('csvIDs' => '1,2', 'ajax' => 1), $this->session());
|
||||
|
||||
$responseData = Convert::json2array($response->getBody());
|
||||
$this->assertTrue(property_exists($responseData['modified'], '1'));
|
||||
$this->assertTrue(property_exists($responseData['modified'], '2'));
|
||||
}
|
||||
|
||||
$this->session()->clear('loggedInAs');
|
||||
|
||||
@ -124,8 +127,8 @@ class CMSMainTest extends FunctionalTest {
|
||||
$this->assertType('SiteTree', $livePage);
|
||||
$this->assertTrue($livePage->canDelete());
|
||||
|
||||
// Check that the 'delete from live' button exists as a simple way of checking that the correct page is returned.
|
||||
$this->assertRegExp('/<input[^>]+type="submit"[^>]+name="action_deletefromlive"/i', $response->getBody());
|
||||
// Check that the 'restore' button exists as a simple way of checking that the correct page is returned.
|
||||
$this->assertRegExp('/<input[^>]+type="submit"[^>]+name="action_restore"/i', $response->getBody());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user