mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
API Rename _versions table to _Versions (#1655)
See https://github.com/silverstripe/silverstripe-framework/pull/6203
This commit is contained in:
parent
d54ae8bb26
commit
13d40f96f3
@ -141,8 +141,8 @@ class CMSMainTest extends FunctionalTest {
|
||||
|
||||
// Get the latest version of the redirector page
|
||||
$pageID = $this->idFromFixture('SilverStripe\\CMS\\Model\\RedirectorPage', 'page5');
|
||||
$latestID = DB::prepared_query('select max("Version") from "RedirectorPage_versions" where "RecordID" = ?', array($pageID))->value();
|
||||
$dsCount = DB::prepared_query('select count("Version") from "RedirectorPage_versions" where "RecordID" = ? and "Version"= ?', array($pageID, $latestID))->value();
|
||||
$latestID = DB::prepared_query('select max("Version") from "RedirectorPage_Versions" where "RecordID" = ?', array($pageID))->value();
|
||||
$dsCount = DB::prepared_query('select count("Version") from "RedirectorPage_Versions" where "RecordID" = ? and "Version"= ?', array($pageID, $latestID))->value();
|
||||
$this->assertEquals(1, $dsCount, "Published page has no duplicate version records: it has " . $dsCount . " for version " . $latestID);
|
||||
|
||||
$this->session()->clear('loggedInAs');
|
||||
|
@ -184,7 +184,7 @@ class SiteTreeActionsTest extends FunctionalTest {
|
||||
$p->write();
|
||||
|
||||
// Looking at the old version, the ability to rollback to that version is available
|
||||
$version = DB::query('SELECT "Version" FROM "SiteTree_versions" WHERE "Content" = \'test page first version\'')->value();
|
||||
$version = DB::query('SELECT "Version" FROM "SiteTree_Versions" WHERE "Content" = \'test page first version\'')->value();
|
||||
$old = Versioned::get_version('Page', $p->ID, $version);
|
||||
$actions = $old->getCMSActions();
|
||||
$this->assertNull($actions->dataFieldByName('action_save'));
|
||||
|
@ -651,14 +651,14 @@ class SiteTreeTest extends SapphireTest {
|
||||
$about->write();
|
||||
|
||||
// Check the version created
|
||||
$savedVersion = DB::query("SELECT \"AuthorID\", \"PublisherID\" FROM \"SiteTree_versions\"
|
||||
$savedVersion = DB::query("SELECT \"AuthorID\", \"PublisherID\" FROM \"SiteTree_Versions\"
|
||||
WHERE \"RecordID\" = $about->ID ORDER BY \"Version\" DESC")->first();
|
||||
$this->assertEquals($memberID, $savedVersion['AuthorID']);
|
||||
$this->assertEquals(0, $savedVersion['PublisherID']);
|
||||
|
||||
// Publish the page
|
||||
$about->publishRecursive();
|
||||
$publishedVersion = DB::query("SELECT \"AuthorID\", \"PublisherID\" FROM \"SiteTree_versions\"
|
||||
$publishedVersion = DB::query("SELECT \"AuthorID\", \"PublisherID\" FROM \"SiteTree_Versions\"
|
||||
WHERE \"RecordID\" = $about->ID ORDER BY \"Version\" DESC")->first();
|
||||
|
||||
// Check the version created
|
||||
|
Loading…
x
Reference in New Issue
Block a user