Translation update done using Pootle.
[phpmyadmin/ammaryasirr.git] / test / libraries / PMA_SQL_parser_data_test.php
blob8c7bc04e8b8ea4b928b10e64c38814d80402c20d
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * tests for correctness of SQL parser data
6 * @package phpMyAdmin-test
7 */
9 /*
10 * Include to test.
12 require_once 'libraries/sqlparser.data.php';
14 class PMA_SQL_parser_data_test extends PHPUnit_Framework_TestCase
16 private function assertSorted($array)
18 $copy = $array;
19 sort($copy);
20 $difference = array_diff_assoc($array, $copy);
21 $this->assertEquals($difference, array());
24 private function assertParserData($name)
26 $this->assertSorted($GLOBALS[$name]);
29 public function testPMA_SQPdata_function_name()
31 $this->assertParserData('PMA_SQPdata_function_name');
34 public function testPMA_SQPdata_column_attrib()
36 $this->assertParserData('PMA_SQPdata_column_attrib');
39 public function testPMA_SQPdata_reserved_word()
41 $this->assertParserData('PMA_SQPdata_reserved_word');
44 public function testPMA_SQPdata_forbidden_word()
46 $this->assertParserData('PMA_SQPdata_forbidden_word');
49 public function testPMA_SQPdata_column_type()
51 $this->assertParserData('PMA_SQPdata_column_type');