mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Fixed SiteTreeActionsTest to use unconditional class defintion - was failing due to recent changes in ClassInfo and class_exists()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@83969 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
26d7985877
commit
9ae437e577
@ -12,16 +12,13 @@
|
|||||||
* @package sapphire
|
* @package sapphire
|
||||||
* @subpackage tests
|
* @subpackage tests
|
||||||
*/
|
*/
|
||||||
if(class_exists('SiteTreeCMSWorkflow')) {
|
|
||||||
class SiteTreeActionsTest extends FunctionalTest {
|
|
||||||
function testDummy() {}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
class SiteTreeActionsTest extends FunctionalTest {
|
class SiteTreeActionsTest extends FunctionalTest {
|
||||||
|
|
||||||
static $fixture_file = 'sapphire/tests/SiteTreeActionsTest.yml';
|
static $fixture_file = 'sapphire/tests/SiteTreeActionsTest.yml';
|
||||||
|
|
||||||
function testActionsNewPage() {
|
function testActionsNewPage() {
|
||||||
|
if(class_exists('SiteTreeCMSWorkflow')) return true;
|
||||||
|
|
||||||
$className = 'Page';
|
$className = 'Page';
|
||||||
$page = new $className();
|
$page = new $className();
|
||||||
$page->Title = 'New ' . $className;
|
$page->Title = 'New ' . $className;
|
||||||
@ -45,6 +42,8 @@ if(class_exists('SiteTreeCMSWorkflow')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function testActionsPublishedRecord() {
|
function testActionsPublishedRecord() {
|
||||||
|
if(class_exists('SiteTreeCMSWorkflow')) return true;
|
||||||
|
|
||||||
$page = new Page();
|
$page = new Page();
|
||||||
$page->write();
|
$page->write();
|
||||||
$page->publish('Stage', 'Live');
|
$page->publish('Stage', 'Live');
|
||||||
@ -64,6 +63,8 @@ if(class_exists('SiteTreeCMSWorkflow')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function testActionsDeletedFromStageRecord() {
|
function testActionsDeletedFromStageRecord() {
|
||||||
|
if(class_exists('SiteTreeCMSWorkflow')) return true;
|
||||||
|
|
||||||
$page = new Page();
|
$page = new Page();
|
||||||
$page->write();
|
$page->write();
|
||||||
$pageID = $page->ID;
|
$pageID = $page->ID;
|
||||||
@ -88,6 +89,8 @@ if(class_exists('SiteTreeCMSWorkflow')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function testActionsChangedOnStageRecord() {
|
function testActionsChangedOnStageRecord() {
|
||||||
|
if(class_exists('SiteTreeCMSWorkflow')) return true;
|
||||||
|
|
||||||
$page = new Page();
|
$page = new Page();
|
||||||
$page->write();
|
$page->write();
|
||||||
$page->publish('Stage', 'Live');
|
$page->publish('Stage', 'Live');
|
||||||
@ -109,5 +112,4 @@ if(class_exists('SiteTreeCMSWorkflow')) {
|
|||||||
$this->assertNotContains('action_revert',$actionsArr);
|
$this->assertNotContains('action_revert',$actionsArr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue
Block a user