From 4d098fc2adda8a170b1c1d85e7b59c7b0195db9b Mon Sep 17 00:00:00 2001 From: Andrew Aitken-Fincham Date: Thu, 24 Aug 2017 11:15:44 +0100 Subject: [PATCH] add test for backslash on Convert::raw2htmlid --- tests/php/Core/ConvertTest.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/php/Core/ConvertTest.php b/tests/php/Core/ConvertTest.php index f6ef743af..d9dcaf2a3 100644 --- a/tests/php/Core/ConvertTest.php +++ b/tests/php/Core/ConvertTest.php @@ -195,11 +195,14 @@ PHP $val1 = 'test test 123'; $this->assertEquals('test_test_123', Convert::raw2htmlid($val1)); - $val1 = 'test[test][123]'; - $this->assertEquals('test_test_123', Convert::raw2htmlid($val1)); + $val2 = 'test[test][123]'; + $this->assertEquals('test_test_123', Convert::raw2htmlid($val2)); - $val1 = '[test[[test]][123]]'; - $this->assertEquals('test_test_123', Convert::raw2htmlid($val1)); + $val3 = '[test[[test]][123]]'; + $this->assertEquals('test_test_123', Convert::raw2htmlid($val3)); + + $val4 = 'A\\Namespaced\\Class'; + $this->assertEquals('A_Namespaced_Class', Convert::raw2htmlid($val4)); } /**