MDL-25720 moodlelib new PARAM_RAW_TRIMMED.

Will be required by the new question engine.
This commit is contained in:
Tim Hunt
2010-12-22 10:51:48 +00:00
parent f056cb544d
commit 652599ecc3
2 changed files with 12 additions and 0 deletions
+4
View File
@@ -313,6 +313,10 @@ class moodlelib_test extends UnitTestCase {
'#()*#,9789\'".,<42897></?$(*DSFMO#$*)(SDJ)($*)');
}
function test_clean_param_trim() {
$this->assertEqual(clean_param(" Frog toad \r\n ", PARAM_RAW_TRIMMED), 'Frog toad');
}
function test_clean_param_clean() {
// PARAM_CLEAN is an ugly hack, do not use in new code (skodak)
// instead use more specific type, or submit sothing that can be verified properly