From e093653e46fd9fae6837ec3b8db94c58abd84239 Mon Sep 17 00:00:00 2001 From: Zarubin Stas Date: Wed, 6 Jul 2011 13:12:34 +0300 Subject: [PATCH] Comments for testBackquote and new testBackquoteForbidenWords. --- test/libraries/common/PMA_quoting_slashing_test.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/libraries/common/PMA_quoting_slashing_test.php b/test/libraries/common/PMA_quoting_slashing_test.php index f63539f3e3..4ebecc0867 100644 --- a/test/libraries/common/PMA_quoting_slashing_test.php +++ b/test/libraries/common/PMA_quoting_slashing_test.php @@ -90,8 +90,19 @@ class PMA_quoting_slashing_test extends PHPUnit_Framework_TestCase * @dataProvider backquoteDataProvider */ public function testBackquote($a, $b) { + // Test bypass quoting (used by dump functions) $this->assertEquals($a, PMA_backquote($a, false)); + + // Test backquote $this->assertEquals($b, PMA_backquote($a)); } + + public function testBackquoteForbidenWords() { + global $PMA_SQPdata_forbidden_word; + + foreach ($PMA_SQPdata_forbidden_word as $forbidden){ + $this->assertEquals("`" . $forbidden . "`", PMA_backquote($forbidden, false)); + } + } } ?>