From c4cc6a47f6d4333587e991614ea253b354828e60 Mon Sep 17 00:00:00 2001 From: Andrew Meredith Date: Tue, 6 May 2014 09:44:17 -0600 Subject: Modify test to run query with db not explicitly set --- test/QueryBuilderTest.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/QueryBuilderTest.php b/test/QueryBuilderTest.php index 3a4a997..3f71bb3 100644 --- a/test/QueryBuilderTest.php +++ b/test/QueryBuilderTest.php @@ -631,8 +631,14 @@ class QueryBuilderTest extends PHPUnit_Framework_TestCase { } public function testIssue176LimitDoesntWorkFirstTime() { - $rs = ORM::for_table('position')->limit(1)->find_array(); - $expected = "SELECT * FROM `position` LIMIT 1"; + ORM::reset_config(); + ORM::reset_db(); + + ORM::configure('logging', true); + ORM::configure('connection_string', 'sqlite::memory:'); + + ORM::for_table('sqlite_master')->limit(1)->find_array(); + $expected = "SELECT * FROM `sqlite_master` LIMIT 1"; $this->assertEquals($expected, ORM::get_last_query()); } } -- cgit v1.2.3