setTheme(); $GLOBALS['goto'] = null; $GLOBALS['showtable'] = null; $GLOBALS['db'] = 'test_db'; $GLOBALS['table'] = 'test_table'; $GLOBALS['urlParams'] = []; $GLOBALS['cfg']['Server'] = $GLOBALS['config']->defaultServer; $GLOBALS['cfg']['Server']['DisableIS'] = true; $_POST = [ 'db' => 'test_db', 'table' => 'test_table', 'selected' => [2 => '`test_table`.`id` = 3'], 'original_sql_query' => 'SELECT * FROM `test_db`.`test_table`', 'fk_checks' => '1', 'mult_btn' => 'Yes', ]; $this->dummyDbi->addSelectDb('test_db'); $this->dummyDbi->addResult('DELETE FROM `test_table` WHERE `test_table`.`id` = 3 LIMIT 1;', []); $this->dummyDbi->addSelectDb('test_db'); $this->dummyDbi->addResult( 'SELECT * FROM `test_db`.`test_table` LIMIT 0, 25', [['1', 'abcd', '2011-01-20 02:00:02'], ['2', 'foo', '2010-01-20 02:00:02']], ['id', 'name', 'datetimefield'] ); $this->dummyDbi->addResult( 'SELECT TABLE_NAME FROM information_schema.VIEWS WHERE TABLE_SCHEMA = \'test_db\'' . ' AND TABLE_NAME = \'test_table\' AND IS_UPDATABLE = \'YES\'', [], ['TABLE_NAME'] ); $response = new ResponseRenderer(); (new DeleteRowsController($response, new Template(), $this->dbi))(); $actual = $response->getHTMLResult(); $this->assertStringContainsString( '