diff options
author | William Desportes <williamdes@wdes.fr> | 2020-10-11 18:36:59 +0300 |
---|---|---|
committer | William Desportes <williamdes@wdes.fr> | 2020-10-11 18:36:59 +0300 |
commit | b5654b02dfa326d1fbcb775b750a5d16f62ce697 (patch) | |
tree | 33a56c3ec0c52be6aa2e1f47a51678e0969e5bcf /test | |
parent | 1a5e045045532049f5a322a4c4c72fb68743bc24 (diff) |
Fix failing tests
Signed-off-by: William Desportes <williamdes@wdes.fr>
Diffstat (limited to 'test')
-rw-r--r-- | test/classes/Controllers/Table/TableSearchControllerTest.php | 3 | ||||
-rw-r--r-- | test/classes/InsertEditTest.php | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/test/classes/Controllers/Table/TableSearchControllerTest.php b/test/classes/Controllers/Table/TableSearchControllerTest.php index 7db1e4af60..2de11e1495 100644 --- a/test/classes/Controllers/Table/TableSearchControllerTest.php +++ b/test/classes/Controllers/Table/TableSearchControllerTest.php @@ -8,6 +8,7 @@ namespace PhpMyAdmin\Tests\Controllers\Table; use PhpMyAdmin\Controllers\Table\TableSearchController; +use PhpMyAdmin\Core; use PhpMyAdmin\Di\Container; use PhpMyAdmin\Relation; use PhpMyAdmin\Tests\PmaTestCase; @@ -342,6 +343,7 @@ class TableSearchControllerTest extends PmaTestCase */ public function testGetDataRowAction() { + $_SESSION[' HMAC_secret '] = hash('sha1', 'test'); $meta_one = new stdClass(); $meta_one->type = 'int'; $meta_one->length = 11; @@ -384,6 +386,7 @@ class TableSearchControllerTest extends PmaTestCase $_POST['db'] = 'PMA'; $_POST['table'] = 'PMA_BookMark'; $_POST['where_clause'] = '`col1` = 1'; + $_POST['where_clause_sign'] = Core::signSqlQuery($_POST['where_clause']); $expected = array( 'col1' => 1, 'col2' => 2 diff --git a/test/classes/InsertEditTest.php b/test/classes/InsertEditTest.php index a12e4e065e..d274ca59b5 100644 --- a/test/classes/InsertEditTest.php +++ b/test/classes/InsertEditTest.php @@ -2380,6 +2380,7 @@ class InsertEditTest extends TestCase */ public function testTransformEditedValues() { + $_SESSION[' HMAC_secret '] = hash('sha1', 'test'); $edited_values = array( array('c' => 'cname') ); @@ -2957,6 +2958,7 @@ class InsertEditTest extends TestCase */ public function testGetHtmlForInsertEditFormColumn() { + $_SESSION[' HMAC_secret '] = hash('sha1', 'test'); $o_rows = 0; $tabindex = 0; $GLOBALS['plugin_scripts'] = array(); |