summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon Holywell <[email protected]>2014-01-23 13:08:20 +0000
committerSimon Holywell <[email protected]>2014-01-23 13:08:20 +0000
commit3fbafbeb80039facd6c3eea33d5060cf82270463 (patch)
tree92a6c35592738c31d2cf3e7a1daa493efe6028c7 /test
parent11e964157a6a2c6128a0546673ad5e99ac1a62cd (diff)
Issue #176 add test for reported case - passes
Diffstat (limited to 'test')
-rw-r--r--test/QueryBuilderTest.php6
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());
+ }
}