mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
FIX: Test updates to comply with https://github.com/silverstripe/silverstripe-framework/pull/7083
This commit is contained in:
parent
9816efc97f
commit
522af3f29d
@ -449,7 +449,7 @@ class SiteTreeTest extends SapphireTest
|
||||
|
||||
$pageAbout->delete();
|
||||
|
||||
$this->assertFalse(DataObject::get_by_id('Page', $pageAbout->ID));
|
||||
$this->assertNull(DataObject::get_by_id('Page', $pageAbout->ID));
|
||||
$this->assertTrue(DataObject::get_by_id('Page', $pageStaff->ID) instanceof Page);
|
||||
$this->assertTrue(DataObject::get_by_id('Page', $pageStaffDuplicate->ID) instanceof Page);
|
||||
Config::inst()->update(SiteTree::class, 'enforce_strict_hierarchy', true);
|
||||
@ -463,7 +463,7 @@ class SiteTreeTest extends SapphireTest
|
||||
|
||||
$pageAbout->delete();
|
||||
|
||||
$this->assertFalse(DataObject::get_by_id('Page', $pageAbout->ID));
|
||||
$this->assertNull(DataObject::get_by_id('Page', $pageAbout->ID));
|
||||
$this->assertFalse(DataObject::get_by_id('Page', $pageStaff->ID));
|
||||
$this->assertFalse(DataObject::get_by_id('Page', $pageStaffDuplicate->ID));
|
||||
}
|
||||
@ -495,7 +495,7 @@ class SiteTreeTest extends SapphireTest
|
||||
|
||||
Versioned::set_stage(Versioned::LIVE);
|
||||
|
||||
$this->assertFalse(DataObject::get_by_id('Page', $pageAbout->ID));
|
||||
$this->assertNull(DataObject::get_by_id('Page', $pageAbout->ID));
|
||||
$this->assertTrue(DataObject::get_by_id('Page', $pageStaff->ID) instanceof Page);
|
||||
$this->assertTrue(DataObject::get_by_id('Page', $pageStaffDuplicate->ID) instanceof Page);
|
||||
Versioned::set_stage(Versioned::DRAFT);
|
||||
@ -518,7 +518,7 @@ class SiteTreeTest extends SapphireTest
|
||||
$parentPage->doUnpublish();
|
||||
|
||||
Versioned::set_stage(Versioned::LIVE);
|
||||
$this->assertFalse(DataObject::get_by_id('Page', $pageAbout->ID));
|
||||
$this->assertNull(DataObject::get_by_id('Page', $pageAbout->ID));
|
||||
$this->assertTrue(DataObject::get_by_id('Page', $pageStaff->ID) instanceof Page);
|
||||
$this->assertTrue(DataObject::get_by_id('Page', $pageStaffDuplicate->ID) instanceof Page);
|
||||
Versioned::set_stage(Versioned::DRAFT);
|
||||
@ -540,9 +540,9 @@ class SiteTreeTest extends SapphireTest
|
||||
$parentPage->doUnpublish();
|
||||
|
||||
Versioned::set_stage(Versioned::LIVE);
|
||||
$this->assertFalse(DataObject::get_by_id('Page', $pageAbout->ID));
|
||||
$this->assertFalse(DataObject::get_by_id('Page', $pageStaff->ID));
|
||||
$this->assertFalse(DataObject::get_by_id('Page', $pageStaffDuplicate->ID));
|
||||
$this->assertNull(DataObject::get_by_id('Page', $pageAbout->ID));
|
||||
$this->assertNull(DataObject::get_by_id('Page', $pageStaff->ID));
|
||||
$this->assertNull(DataObject::get_by_id('Page', $pageStaffDuplicate->ID));
|
||||
Versioned::set_stage(Versioned::DRAFT);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user