BUGFIX: tables and column quoted properly (from r101493)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112002 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-10-13 00:47:41 +00:00
parent 0ec9d0e48f
commit 51c9fa8a45

View File

@ -106,11 +106,11 @@ class VirtualPageTest extends SapphireTest {
// The draft content of the virtual page should say 'draft content'
$this->assertEquals('draft content',
DB::query('SELECT "Content" from "SiteTree" WHERE ID = ' . $vp->ID)->value());
DB::query('SELECT "Content" from "SiteTree" WHERE "ID" = ' . $vp->ID)->value());
// The published content of the virtual page should say 'published content'
$this->assertEquals('published content',
DB::query('SELECT "Content" from "SiteTree_Live" WHERE ID = ' . $vp->ID)->value());
DB::query('SELECT "Content" from "SiteTree_Live" WHERE "ID" = ' . $vp->ID)->value());
}
function testCantPublishVirtualPagesBeforeTheirSource() {
@ -237,7 +237,7 @@ class VirtualPageTest extends SapphireTest {
// Check that the published content is copied from the published page, with a legal
// version
$liveVersion = DB::query("SELECT Version FROM \"SiteTree_Live\" WHERE ID = $vp->ID")->value();
$liveVersion = DB::query("SELECT \"Version\" FROM \"SiteTree_Live\" WHERE \"ID\" = $vp->ID")->value();
$this->assertEquals("T0", DB::query("SELECT \"Title\" FROM \"SiteTree_Live\"
WHERE \"ID\" = $vp->ID")->value());