summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2017-06-15 13:22:49 +0200
committerGitHub <noreply@github.com>2017-06-15 13:22:49 +0200
commitaf5c8960d80a9db362722ca675ffddb2079bbce9 (patch)
tree8156e7bef8af0565f287355772c9ec34593c9a11 /tests/codeigniter
parentf51687fb99a905fe4f63918aaae672a2fdf20334 (diff)
parentbcd005fafa195d443db2419629bfeed99e49fc7e (diff)
Merge pull request #5155 from tianhe1986/develop_count_ignore_limit
Fix CI_DB_query_builder::count_all_results() returning wrong count with LIMIT/OFFSET
Diffstat (limited to 'tests/codeigniter')
-rw-r--r--tests/codeigniter/database/query_builder/count_test.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/codeigniter/database/query_builder/count_test.php b/tests/codeigniter/database/query_builder/count_test.php
index 90ac5283e..da312d866 100644
--- a/tests/codeigniter/database/query_builder/count_test.php
+++ b/tests/codeigniter/database/query_builder/count_test.php
@@ -35,4 +35,14 @@ class Count_test extends CI_TestCase {
$this->assertEquals(2, $this->db->like('name', 'ian')->count_all_results('job'));
}
+ // ------------------------------------------------------------------------
+
+ /**
+ * @see ./mocks/schema/skeleton.php
+ */
+ public function test_count_all_results_limit()
+ {
+ $this->assertEquals(1, $this->db->like('name', 'ian')->limit(1)->count_all_results('job'));
+ }
+
} \ No newline at end of file