mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Added test for SiteTree::publish
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@40233 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
188526a9de
commit
d595057533
@ -27,4 +27,24 @@ class SiteTreeTest extends SapphireTest {
|
|||||||
$this->assertEquals($urlSegment, $obj->URLSegment);
|
$this->assertEquals($urlSegment, $obj->URLSegment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test that publication copies data to SiteTree_Live
|
||||||
|
*/
|
||||||
|
function testPublishCopiesToLiveTable() {
|
||||||
|
$obj = $this->objFromFixture('Page','about');
|
||||||
|
$obj->publish('Stage', 'Live');
|
||||||
|
|
||||||
|
$createdID = DB::query("SELECT ID FROM SiteTree_Live WHERE URLSegment = '$obj->URLSegment'")->value();
|
||||||
|
$this->assertEquals($obj->ID, $createdID);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test that saving changes creates a new version with the correct data in it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test that publishing an unsaved page will save the changes before publishing
|
||||||
|
*/
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user