From f1794585421e4c727be3b52d10d746e6590d9144 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 15 Oct 2010 03:46:08 +0000 Subject: [PATCH] BUGFIX: Added quotes for postgres (from r107428) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112592 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- tests/SiteTreeTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/SiteTreeTest.php b/tests/SiteTreeTest.php index 883d0b178..5b921ddfe 100755 --- a/tests/SiteTreeTest.php +++ b/tests/SiteTreeTest.php @@ -59,21 +59,21 @@ class SiteTreeTest extends SapphireTest { $remove = DataObject::get('SiteTree'); if($remove) foreach($remove as $page) $page->delete(); // Make sure the table is empty - $this->assertEquals(DB::query('SELECT COUNT(ID) FROM "SiteTree"')->value(), 0); + $this->assertEquals(DB::query('SELECT COUNT("ID") FROM "SiteTree"')->value(), 0); // Disable the creation SiteTree::set_create_defaultpages(false); singleton('SiteTree')->requireDefaultRecords(); // The table should still be empty - $this->assertEquals(DB::query('SELECT COUNT(ID) FROM "SiteTree"')->value(), 0); + $this->assertEquals(DB::query('SELECT COUNT("ID") FROM "SiteTree"')->value(), 0); // Enable the creation SiteTree::set_create_defaultpages(true); singleton('SiteTree')->requireDefaultRecords(); // The table should now have three rows (home, about-us, contact-us) - $this->assertEquals(DB::query('SELECT COUNT(ID) FROM "SiteTree"')->value(), 3); + $this->assertEquals(DB::query('SELECT COUNT("ID") FROM "SiteTree"')->value(), 3); } /**