diff options
author | Andrey Andreev <narf@devilix.net> | 2018-04-14 15:45:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-14 15:45:56 +0200 |
commit | fb61fa32ff681eb6aba05d0966600bc8f896daac (patch) | |
tree | 5d8ea07367b15066a9992f498f55916f136f7b03 /tests/codeigniter | |
parent | c243df3af851fe90cd272f3958f7eb7bf76173b1 (diff) | |
parent | deba4d95c0704779a2059f7f06306a4848f7a0c0 (diff) |
Merge pull request #5464 from ytetsuro/fix/#5462/like-before-bug
Fixed issue #5462 Query Builder LIKE BEFORE doesnt work
Diffstat (limited to 'tests/codeigniter')
-rw-r--r-- | tests/codeigniter/database/query_builder/like_test.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/codeigniter/database/query_builder/like_test.php b/tests/codeigniter/database/query_builder/like_test.php index 3672afae3..4d8673d99 100644 --- a/tests/codeigniter/database/query_builder/like_test.php +++ b/tests/codeigniter/database/query_builder/like_test.php @@ -103,4 +103,27 @@ class Like_test extends CI_TestCase { $this->assertCount(1, $tabs); } + /** + * GitHub issue #5462 + * + * @see ./mocks/schema/skeleton.php + * + * @dataProvider like_set_side_provider + */ + public function test_like_set_side($str, $side, $expected_name) + { + $actual = $this->db->like('name', $str, $side)->get('job')->result_array(); + $this->assertCount(1, $actual); + $this->assertEquals($expected_name, $actual[0]['name']); + } + + public function like_set_side_provider() + { + return array( + array('Developer', 'none', 'Developer'), + array('tician', 'before', 'Politician'), + array('Accou', 'after', 'Accountant'), + array('usicia', 'both', 'Musician'), + ); + } } |