public function testJsonResultValuesFromRequestParameters()
 {
     $parser = $this->getMockBuilder('\\Parser')->disableOriginalConstructor()->getMock();
     $instance = new ApiRequestProcessor($parser);
     $parameters = array('query' => 'foo', 'sep' => ',');
     $this->assertInternalType('object', $instance->getJsonDecodedResultValuesForRequestParameters($parameters));
 }
 /**
  * @see ApiBase::execute
  */
 public function execute()
 {
     $parser = new Parser($GLOBALS['wgParserConf']);
     $parser->setTitle(Title::newFromText('NO TITLE'));
     $parser->mOptions = new ParserOptions();
     $parser->mOutput = new ParserOutput();
     $apiRequestProcessor = new ApiRequestProcessor($parser);
     $apiRequestProcessor->setDebugFlag($GLOBALS['wgSF_Select_debug']);
     $resultValues = $apiRequestProcessor->getJsonDecodedResultValuesForRequestParameters($this->extractRequestParams());
     $result = $this->getResult();
     $result->setIndexedTagName($resultValues->values, 'value');
     $result->addValue($this->getModuleName(), 'values', $resultValues->values);
     $result->addValue($this->getModuleName(), 'count', $resultValues->count);
     return true;
 }