PHP Class SqlParser\Tests\TestCase

Inheritance: extends PHPUnit_Framework_TestCase
显示文件 Open project: phpmyadmin/sql-parser

Public Methods

Method Description
getData ( string $name ) : array Gets test's input and expected output.
getErrorsAsArray ( Lexer | Parser $obj ) : array Gets the errors as an array.
getTokensList ( string $query ) : TokensList Gets the token list generated by lexing this query.
runParserTest ( string $name ) : void Runs a test.

Method Details

getData() public method

Gets test's input and expected output.
public getData ( string $name ) : array
$name string The name of the test.
return array

getErrorsAsArray() public method

Gets the errors as an array.
public getErrorsAsArray ( Lexer | Parser $obj ) : array
$obj SqlParser\Lexer | SqlParser\Parser Object containing the errors.
return array

getTokensList() public method

Gets the token list generated by lexing this query.
public getTokensList ( string $query ) : TokensList
$query string The query to be lexed.
return TokensList

runParserTest() public method

Runs a test.
public runParserTest ( string $name ) : void
$name string The name of the test.
return void