/** * Test for replace * * @return void */ public function testReplace() { $tableSearch = new TableSearchController("zoom", null); $columnIndex = 0; $find = "Field"; $replaceWith = "Column"; $useRegex = false; $charSet = "UTF-8"; $tableSearch->replace($columnIndex, $find, $replaceWith, $useRegex, $charSet); $sql_query = $GLOBALS['sql_query']; $result = "UPDATE `PMA_BookMark` SET `Field1` = " . "REPLACE(`Field1`, 'Field', 'Column') " . "WHERE `Field1` LIKE '%Field%' COLLATE UTF-8_bin"; $this->assertEquals($result, $sql_query); }