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
|
||||
* @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';
|
||||
|
||||
function testActionsNewPage() {
|
||||
if(class_exists('SiteTreeCMSWorkflow')) return true;
|
||||
|
||||
$className = 'Page';
|
||||
$page = new $className();
|
||||
$page->Title = 'New ' . $className;
|
||||
@ -45,6 +42,8 @@ if(class_exists('SiteTreeCMSWorkflow')) {
|
||||
}
|
||||
|
||||
function testActionsPublishedRecord() {
|
||||
if(class_exists('SiteTreeCMSWorkflow')) return true;
|
||||
|
||||
$page = new Page();
|
||||
$page->write();
|
||||
$page->publish('Stage', 'Live');
|
||||
@ -64,6 +63,8 @@ if(class_exists('SiteTreeCMSWorkflow')) {
|
||||
}
|
||||
|
||||
function testActionsDeletedFromStageRecord() {
|
||||
if(class_exists('SiteTreeCMSWorkflow')) return true;
|
||||
|
||||
$page = new Page();
|
||||
$page->write();
|
||||
$pageID = $page->ID;
|
||||
@ -88,6 +89,8 @@ if(class_exists('SiteTreeCMSWorkflow')) {
|
||||
}
|
||||
|
||||
function testActionsChangedOnStageRecord() {
|
||||
if(class_exists('SiteTreeCMSWorkflow')) return true;
|
||||
|
||||
$page = new Page();
|
||||
$page->write();
|
||||
$page->publish('Stage', 'Live');
|
||||
@ -108,6 +111,5 @@ if(class_exists('SiteTreeCMSWorkflow')) {
|
||||
$this->assertContains('action_rollback',$actionsArr);
|
||||
$this->assertNotContains('action_revert',$actionsArr);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue
Block a user