From 06ba0085dda382ab63679ce2a46e3dd9787cace0 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 15 Oct 2010 02:57:14 +0000 Subject: [PATCH] MINOR: Added test for Database::hasTable(). (from r106119) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112519 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- tests/model/DatabaseTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/model/DatabaseTest.php b/tests/model/DatabaseTest.php index 572400947..46647c373 100644 --- a/tests/model/DatabaseTest.php +++ b/tests/model/DatabaseTest.php @@ -75,6 +75,11 @@ class DatabaseTest extends SapphireTest { $this->assertFalse($db->doesSchemaNeedUpdating()); } + function testHasTable() { + $this->assertTrue(DB::getConn()->hasTable('DatabaseTest_MyObject')); + $this->assertFalse(DB::getConn()->hasTable('asdfasdfasdf')); + } + } class DatabaseTest_MyObject extends DataObject implements TestOnly {