Add testcase for backticked table.

This commit is contained in:
Michal Čihař
2010-08-30 15:55:52 +02:00
parent 24b83423ce
commit 4afbb59588

View File

@@ -100,5 +100,45 @@ class PMA_SQL_parser_test extends PHPUnit_Framework_TestCase
'len' => 5,
));
}
public function testParse_3()
{
$this->assertParser('SELECT * from `aaa`;', array (
'raw' => 'SELECT * from `aaa`;',
0 =>
array (
'type' => 'alpha_reservedWord',
'data' => 'SELECT',
'pos' => 6,
'forbidden' => true,
),
1 =>
array (
'type' => 'punct',
'data' => '*',
'pos' => 0,
),
2 =>
array (
'type' => 'alpha_reservedWord',
'data' => 'from',
'pos' => 13,
'forbidden' => true,
),
3 =>
array (
'type' => 'quote_backtick',
'data' => '`aaa`',
'pos' => 0,
),
4 =>
array (
'type' => 'punct_queryend',
'data' => ';',
'pos' => 0,
),
'len' => 5,
));
}
}
?>