function PMA_transformation_text_plain__sql($buffer, $options = array(), $meta = '')
{
    $result = PMA_SQP_formatHtml(PMA_SQP_parse($buffer));
    // Need to clear error state not to break subsequent queries display.
    PMA_SQP_resetError();
    return $result;
}
 /**
  * Testing of SQL parser.
  *
  * @param string $sql      SQL query to parse
  * @param array  $expected Expected parse result
  * @param string $error    Expected error message
  *
  * @return void
  *
  * @dataProvider parserData
  * @group medium
  */
 public function testParser($sql, $expected, $error = '')
 {
     PMA_SQP_resetError();
     $parsed_sql = PMA_SQP_parse($sql);
     $this->assertEquals($error, PMA_SQP_getErrorString());
     $this->assertEquals($expected, $parsed_sql);
 }
 /**
  * Does the actual work of each specific transformations plugin.
  *
  * @param string $buffer  text to be transformed
  * @param array  $options transformation options
  * @param string $meta    meta information
  *
  * @return string
  */
 public function applyTransformation($buffer, $options = array(), $meta = '')
 {
     // see PMA_highlightSQL()
     $result = PMA_Util::formatSql($buffer);
     // Need to clear error state not to break subsequent queries display.
     PMA_SQP_resetError();
     return $result;
 }
 /**
  * Test for PMA_SQP_isKeyWord
  *
  * @return void
  */
 public function testPMA_SQP_isKeyWord()
 {
     PMA_SQP_resetError();
     $this->assertTrue(PMA_SQP_isKeyWord("ACCESSIBLE"));
     $this->assertTrue(PMA_SQP_isKeyWord("accessible"));
     $this->assertTrue(PMA_SQP_isKeyWord("ASC"));
     $this->assertFalse(PMA_SQP_isKeyWord("hello"));
 }