mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #7309 from andrewandante/pulls/update_test_for_raw2htmlid
add test for backslash on Convert::raw2htmlid
This commit is contained in:
commit
85f4a41c67
@ -195,11 +195,14 @@ PHP
|
|||||||
$val1 = 'test test 123';
|
$val1 = 'test test 123';
|
||||||
$this->assertEquals('test_test_123', Convert::raw2htmlid($val1));
|
$this->assertEquals('test_test_123', Convert::raw2htmlid($val1));
|
||||||
|
|
||||||
$val1 = 'test[test][123]';
|
$val2 = 'test[test][123]';
|
||||||
$this->assertEquals('test_test_123', Convert::raw2htmlid($val1));
|
$this->assertEquals('test_test_123', Convert::raw2htmlid($val2));
|
||||||
|
|
||||||
$val1 = '[test[[test]][123]]';
|
$val3 = '[test[[test]][123]]';
|
||||||
$this->assertEquals('test_test_123', Convert::raw2htmlid($val1));
|
$this->assertEquals('test_test_123', Convert::raw2htmlid($val3));
|
||||||
|
|
||||||
|
$val4 = 'A\\Namespaced\\Class';
|
||||||
|
$this->assertEquals('A_Namespaced_Class', Convert::raw2htmlid($val4));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user