mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02: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
|
// Get the latest version of the redirector page
|
||||||
$pageID = $this->idFromFixture('SilverStripe\\CMS\\Model\\RedirectorPage', 'page5');
|
$pageID = $this->idFromFixture('SilverStripe\\CMS\\Model\\RedirectorPage', 'page5');
|
||||||
$latestID = DB::prepared_query('select max("Version") from "RedirectorPage_versions" where "RecordID" = ?', array($pageID))->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();
|
$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->assertEquals(1, $dsCount, "Published page has no duplicate version records: it has " . $dsCount . " for version " . $latestID);
|
||||||
|
|
||||||
$this->session()->clear('loggedInAs');
|
$this->session()->clear('loggedInAs');
|
||||||
|
@ -184,7 +184,7 @@ class SiteTreeActionsTest extends FunctionalTest {
|
|||||||
$p->write();
|
$p->write();
|
||||||
|
|
||||||
// Looking at the old version, the ability to rollback to that version is available
|
// 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);
|
$old = Versioned::get_version('Page', $p->ID, $version);
|
||||||
$actions = $old->getCMSActions();
|
$actions = $old->getCMSActions();
|
||||||
$this->assertNull($actions->dataFieldByName('action_save'));
|
$this->assertNull($actions->dataFieldByName('action_save'));
|
||||||
|
@ -651,14 +651,14 @@ class SiteTreeTest extends SapphireTest {
|
|||||||
$about->write();
|
$about->write();
|
||||||
|
|
||||||
// Check the version created
|
// 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();
|
WHERE \"RecordID\" = $about->ID ORDER BY \"Version\" DESC")->first();
|
||||||
$this->assertEquals($memberID, $savedVersion['AuthorID']);
|
$this->assertEquals($memberID, $savedVersion['AuthorID']);
|
||||||
$this->assertEquals(0, $savedVersion['PublisherID']);
|
$this->assertEquals(0, $savedVersion['PublisherID']);
|
||||||
|
|
||||||
// Publish the page
|
// Publish the page
|
||||||
$about->publishRecursive();
|
$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();
|
WHERE \"RecordID\" = $about->ID ORDER BY \"Version\" DESC")->first();
|
||||||
|
|
||||||
// Check the version created
|
// Check the version created
|
||||||
|
Loading…
Reference in New Issue
Block a user