diff options
author | Andrey Andreev <narf@devilix.net> | 2017-06-15 13:22:49 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2017-06-15 13:23:28 +0200 |
commit | 2c1b3d9694e570c45ac82fcefbb51c965c6ea8a8 (patch) | |
tree | 273d1c2f5156a22e7502b6c10cd42f23a707dde7 /tests/codeigniter/database | |
parent | fffdd9c20b2faa49070e67ec59f03c262085d7fc (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/database')
-rw-r--r-- | tests/codeigniter/database/query_builder/count_test.php | 10 |
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 |