dummyDbi->addSelectDb('test_db'); $this->dummyDbi->addResult('SHOW TABLES LIKE \'test_table\';', [['test_table']]); $response = new ResponseRenderer(); $template = new Template(); $controller = new ZoomSearchController( $response, $template, new Search($this->dbi), new Relation($this->dbi), $this->dbi ); $controller(); $expected = $template->render('table/zoom_search/index', [ 'db' => $GLOBALS['db'], 'table' => $GLOBALS['table'], 'goto' => 'index.php?route=/sql&server=2&lang=en', 'self' => $controller, 'geom_column_flag' => false, 'column_names' => ['id', 'name', 'datetimefield'], 'data_label' => 'name', 'keys' => [], 'criteria_column_names' => null, 'criteria_column_types' => null, 'max_plot_limit' => 500, ]); $this->assertSame($expected, $response->getHTMLResult()); } }