Add a test for issue #273
diff --git a/tests/codeigniter/database/query_builder/like_test.php b/tests/codeigniter/database/query_builder/like_test.php
index 5f3e522..20ce5d9 100644
--- a/tests/codeigniter/database/query_builder/like_test.php
+++ b/tests/codeigniter/database/query_builder/like_test.php
@@ -87,4 +87,20 @@
$this->assertEquals('Musician', $jobs[2]['name']);
}
+ // ------------------------------------------------------------------------
+
+ /**
+ * GitHub issue #273
+ *
+ * @see ./mocks/schema/skeleton.php
+ */
+ public function test_like_spaces_and_tabs()
+ {
+ $spaces = $this->db->like('key', ' ')->get('misc')->result_array();
+ $tabs = $this->db->like('key', "\t")->get('misc')->result_array();
+
+ $this->assertEquals(1, count($spaces));
+ $this->assertEquals(1, count($tabs));
+ }
+
}
\ No newline at end of file
diff --git a/tests/mocks/database/schema/skeleton.php b/tests/mocks/database/schema/skeleton.php
index 18e1ddd..fb9aaef 100644
--- a/tests/mocks/database/schema/skeleton.php
+++ b/tests/mocks/database/schema/skeleton.php
@@ -129,7 +129,8 @@
),
'misc' => array(
array('id' => 1, 'key' => '\\xxxfoo456', 'value' => 'Entry with \\xxx'),
- array('id' => 2, 'key' => '\\%foo456', 'value' => 'Entry with \\%')
+ array('id' => 2, 'key' => '\\%foo456', 'value' => 'Entry with \\%'),
+ array('id' => 3, 'key' => ' One two three tab')
)
);