mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR Fixed broken SiteTreeTest in databases that don't support LIMIT. Instead of limit, just return the first record in the sorted set
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88242 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
baea4ee2ba
commit
dbc560d59b
@ -366,14 +366,14 @@ class SiteTreeTest extends SapphireTest {
|
||||
|
||||
// Check the version created
|
||||
$savedVersion = DB::query("SELECT \"AuthorID\", \"PublisherID\" FROM \"SiteTree_versions\"
|
||||
WHERE \"RecordID\" = $about->ID ORDER BY \"Version\" DESC LIMIT 1")->record();
|
||||
WHERE \"RecordID\" = $about->ID ORDER BY \"Version\" DESC")->first();
|
||||
$this->assertEquals($memberID, $savedVersion['AuthorID']);
|
||||
$this->assertEquals(0, $savedVersion['PublisherID']);
|
||||
|
||||
// Publish the page
|
||||
$about->doPublish();
|
||||
$publishedVersion = DB::query("SELECT \"AuthorID\", \"PublisherID\" FROM \"SiteTree_versions\"
|
||||
WHERE \"RecordID\" = $about->ID ORDER BY \"Version\" DESC LIMIT 1")->record();
|
||||
WHERE \"RecordID\" = $about->ID ORDER BY \"Version\" DESC")->first();
|
||||
|
||||
// Check the version created
|
||||
$this->assertEquals($memberID, $publishedVersion['AuthorID']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user