diff options
Diffstat (limited to 'tests/codeigniter/database')
-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..f8409092a 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 [ + ['Developer', 'none', 'Developer'], + ['tician', 'before', 'Politician'], + ['Accou', 'after', 'Accountant'], + ['usicia', 'both', 'Musician'], + ]; + } } |