add test for backslash on Convert::raw2htmlid

This commit is contained in:
Andrew Aitken-Fincham 2017-08-24 11:15:44 +01:00
parent d52e972453
commit 4d098fc2ad

View File

@ -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));
}
/**