Skip to content

Commit

Permalink
Fix some failing tests
Browse files Browse the repository at this point in the history
Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed May 1, 2020
1 parent 2c1d08b commit 7db0deb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Expand Up @@ -244,7 +244,7 @@ public function index(): void
$this->response->addJSON('newname', $_POST['newname']);
$this->response->addJSON(
'sql_query',
Generator::getMessage(null, $sql_query)
Generator::getMessage('', $sql_query)
);
$this->response->addJSON('db', $db);
return;
Expand Down
Expand Up @@ -246,7 +246,7 @@ public function create(): void

$json = [
'message' => $message,
'sql_query' => Generator::getMessage(null, $sqlQuery, 'success'),
'sql_query' => Generator::getMessage('', $sqlQuery, 'success'),
'url_query' => $scriptName . Url::getCommon(
['db' => $params['new_db']],
strpos($scriptName, '?') === false ? '?' : '&'
Expand Down
2 changes: 1 addition & 1 deletion libraries/classes/Server/Privileges.php
Expand Up @@ -1716,7 +1716,7 @@ public function getExtraDataForAjaxBehavior(

$extra_data = [];
if (strlen($sql_query) > 0) {
$extra_data['sql_query'] = Generator::getMessage(null, $sql_query);
$extra_data['sql_query'] = Generator::getMessage('', $sql_query);
}

if (isset($_POST['change_copy'])) {
Expand Down
2 changes: 1 addition & 1 deletion test/classes/Server/PrivilegesTest.php
Expand Up @@ -1516,7 +1516,7 @@ public function testGetExtraDataForAjaxBehavior()

//sql_query
$this->assertEquals(
Generator::getMessage(null, $sql_query),
Generator::getMessage('', $sql_query),
$extra_data['sql_query']
);

Expand Down

0 comments on commit 7db0deb

Please sign in to comment.