setAjax(true); $_REQUEST['table'] = 'City'; (new RealRowCountController($response, new Template(), 'world', $this->dbi))(); $json = $response->getJSONResult(); self::assertEquals('4,079', $json['real_row_count']); $_REQUEST['real_row_count_all'] = 'on'; (new RealRowCountController($response, new Template(), 'world', $this->dbi))(); $json = $response->getJSONResult(); $expected = [ ['table' => 'City', 'row_count' => '4,079'], ['table' => 'Country', 'row_count' => '239'], ['table' => 'CountryLanguage', 'row_count' => '984'], ]; self::assertEquals($expected, $json['real_row_count_all']); } }