public/phpmyadmin/vendor/phpmyadmin/sql-parser/tests/TestCase.php
/**
     * Runs a test.
     *
     * @param string $name the name of the test
     */
Runs a test.
@param string $name the name of the test
Runs a test . @param string $name the name of the test
public function runParserTest($name)
    {
        $data = $this->getData($name);
        $lexer = new Lexer($data['query']);
        $lexerErrors = $this->getErrorsAsArray($lexer);
        $lexer->errors = array();
        $parser = empty($data['parser']) ? null : new Parser($lexer->list);
        $parserErrors = array();
        if ($parser !== null) {
            $parserErrors = $this->getErrorsAsArray($parser);
            $parser->errors = array();
        }
        $this->assertEquals($data['lexer'], $lexer);
        $this->assertEquals($data['parser'], $parser);
        $this->assertEquals($data['errors']['parser'], $parserErrors);
        $this->assertEquals($data['errors']['lexer'], $lexerErrors);
    }
public function runParserTest ( $ name ) { $ data = $ this -> getData ( $ name ) ; $ lexer = new Lexer ( $ data [ 'query' ] ) ; $ lexerErrors = $ this -> getErrorsAsArray ( $ lexer ) ; $ lexer -> errors = array ( ) ; $ parser = empty ( $ data [ 'parser' ] ) ? null : new Parser ( $ lexer -> list ) ; $ parserErrors = array ( ) ; if ( $ parser !== null ) { $ parserErrors = $ this -> getErrorsAsArray ( $ parser ) ; $ parser -> errors = array ( ) ; } $ this -> assertEquals ( $ data [ 'lexer' ] , $ lexer ) ; $ this -> assertEquals ( $ data [ 'parser' ] , $ parser ) ; $ this -> assertEquals ( $ data [ 'errors' ] [ 'parser' ] , $ parserErrors ) ; $ this -> assertEquals ( $ data [ 'errors' ] [ 'lexer' ] , $ lexerErrors ) ; }
Runs a test.
Runs a test .
/**
         * Test's data.
         *
         * @var array
         */ // Lexer. // Parser. // Testing objects. // Testing errors.