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
This commit is contained in:
Ingo Schommer 2010-10-15 03:46:08 +00:00
parent 2f4fe2ff35
commit f179458542

View File

@ -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);
}
/**