From c576995304fc3609cca0b7b92d1b2cd611ec82f5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 16 Jan 2019 17:49:35 +0200 Subject: [ci skip] 3.1.10 release --- .../database/query_builder/escape_test.php | 68 ---------------------- 1 file changed, 68 deletions(-) delete mode 100644 tests/codeigniter/database/query_builder/escape_test.php (limited to 'tests/codeigniter/database/query_builder/escape_test.php') diff --git a/tests/codeigniter/database/query_builder/escape_test.php b/tests/codeigniter/database/query_builder/escape_test.php deleted file mode 100644 index de6cd0a9d..000000000 --- a/tests/codeigniter/database/query_builder/escape_test.php +++ /dev/null @@ -1,68 +0,0 @@ -db = Mock_Database_Schema_Skeleton::init(DB_DRIVER); - - Mock_Database_Schema_Skeleton::create_tables(); - Mock_Database_Schema_Skeleton::create_data(); - } - - // ------------------------------------------------------------------------ - - /** - * @see ./mocks/schema/skeleton.php - */ - public function test_escape_like_percent_sign() - { - // Escape the like string - $string = $this->db->escape_like_str('\%foo'); - - if (strpos(DB_DRIVER, 'mysql') !== FALSE) - { - $sql = "SELECT `value` FROM `misc` WHERE `key` LIKE '$string%' ESCAPE '!';"; - } - else - { - $sql = 'SELECT "value" FROM "misc" WHERE "key" LIKE \''.$string.'%\' ESCAPE \'!\';'; - } - - $res = $this->db->query($sql)->result_array(); - - // Check the result - $this->assertCount(1, $res); - } - - // ------------------------------------------------------------------------ - - /** - * @see ./mocks/schema/skeleton.php - */ - public function test_escape_like_backslash_sign() - { - // Escape the like string - $string = $this->db->escape_like_str('\\'); - - if (strpos(DB_DRIVER, 'mysql') !== FALSE) - { - $sql = "SELECT `value` FROM `misc` WHERE `key` LIKE '$string%' ESCAPE '!';"; - } - else - { - $sql = 'SELECT "value" FROM "misc" WHERE "key" LIKE \''.$string.'%\' ESCAPE \'!\';'; - } - - $res = $this->db->query($sql)->result_array(); - - // Check the result - $this->assertCount(2, $res); - } - -} -- cgit v1.2.3-24-g4f1b