diff options
author | Simon Holywell <[email protected]> | 2014-01-23 13:08:20 +0000 |
---|---|---|
committer | Simon Holywell <[email protected]> | 2014-01-23 13:08:20 +0000 |
commit | 3fbafbeb80039facd6c3eea33d5060cf82270463 (patch) | |
tree | 92a6c35592738c31d2cf3e7a1daa493efe6028c7 /test | |
parent | 11e964157a6a2c6128a0546673ad5e99ac1a62cd (diff) |
Issue #176 add test for reported case - passes
Diffstat (limited to 'test')
-rw-r--r-- | test/QueryBuilderTest.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/QueryBuilderTest.php b/test/QueryBuilderTest.php index 590f5e2..2f60c59 100644 --- a/test/QueryBuilderTest.php +++ b/test/QueryBuilderTest.php @@ -550,5 +550,11 @@ class QueryBuilderTest extends PHPUnit_Framework_TestCase { $expected = "UPDATE `widget` SET `added` = NOW() WHERE `id` = '1'"; $this->assertEquals($expected, ORM::get_last_query()); } + + public function testIssue176LimitDoesntWorkFirstTime() { + $rs = ORM::for_table('position')->limit(1)->find_array(); + $expected = "SELECT * FROM `position` LIMIT 1"; + $this->assertEquals($expected, ORM::get_last_query()); + } } |