From 105a1275e50091486a826ac40aaa1d7b9f4a2569 Mon Sep 17 00:00:00 2001 From: Dan Ungureanu Date: Sun, 21 Jun 2015 22:25:04 +0300 Subject: Fixed failing test. Signed-off-by: Dan Ungureanu --- test/libraries/common/PMA_quoting_slashing_test.php | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'test') diff --git a/test/libraries/common/PMA_quoting_slashing_test.php b/test/libraries/common/PMA_quoting_slashing_test.php index 2710946b89..b5d837a9e0 100644 --- a/test/libraries/common/PMA_quoting_slashing_test.php +++ b/test/libraries/common/PMA_quoting_slashing_test.php @@ -214,13 +214,18 @@ class PMA_QuotingSlashing_Test extends PHPUnit_Framework_TestCase */ public function testBackquoteForbidenWords() { - global $PMA_SQPdata_forbidden_word; - - foreach ($PMA_SQPdata_forbidden_word as $forbidden) { - $this->assertEquals( - "`" . $forbidden . "`", - PMA_Util::backquote($forbidden, false) - ); + foreach (SqlParser\Context::$KEYWORDS as $keyword => $type) { + if ($type & SqlParser\Token::FLAG_KEYWORD_RESERVED) { + $this->assertEquals( + "`" . $keyword . "`", + PMA_Util::backquote($keyword, false) + ); + } else { + $this->assertEquals( + $keyword, + PMA_Util::backquote($keyword, false) + ); + } } } } -- cgit v1.2.3