mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: Ensure that tests work by giving the test executor admin rights (from r89124)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89217 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
16189a4697
commit
f792d16c01
@ -93,16 +93,18 @@ class SiteTreeTest extends SapphireTest {
|
||||
* Test that field which are set and then cleared are also transferred to the published site.
|
||||
*/
|
||||
function testPublishDeletedFields() {
|
||||
$this->logInWithPermssion('ADMIN');
|
||||
|
||||
$obj = $this->objFromFixture('Page', 'about');
|
||||
$obj->MetaTitle = "asdfasdf";
|
||||
$obj->write();
|
||||
$obj->doPublish();
|
||||
$this->assertTrue($obj->doPublish());
|
||||
|
||||
$this->assertEquals('asdfasdf', DB::query("SELECT \"MetaTitle\" FROM \"SiteTree_Live\" WHERE \"ID\" = '$obj->ID'")->value());
|
||||
|
||||
$obj->MetaTitle = null;
|
||||
$obj->write();
|
||||
$obj->doPublish();
|
||||
$this->assertTrue($obj->doPublish());
|
||||
|
||||
$this->assertNull(DB::query("SELECT \"MetaTitle\" FROM \"SiteTree_Live\" WHERE \"ID\" = '$obj->ID'")->value());
|
||||
|
||||
@ -316,6 +318,8 @@ class SiteTreeTest extends SapphireTest {
|
||||
}
|
||||
|
||||
function testDeleteFromLiveOperatesRecursively() {
|
||||
$this->logInWithPermssion('ADMIN');
|
||||
|
||||
$pageAbout = $this->objFromFixture('Page', 'about');
|
||||
$pageAbout->doPublish();
|
||||
$pageStaff = $this->objFromFixture('Page', 'staff');
|
||||
|
@ -30,6 +30,8 @@ class VirtualPageTest extends SapphireTest {
|
||||
* are published
|
||||
*/
|
||||
function testPublishingSourcePagePublishesVirtualPages() {
|
||||
$this->logInWithPermssion('ADMIN');
|
||||
|
||||
$master = $this->objFromFixture('Page', 'master');
|
||||
$master->Title = "New title";
|
||||
$master->MenuTitle = "New menutitle";
|
||||
|
Loading…
Reference in New Issue
Block a user