MDL-51915 lib tests: Extra unit test for html_to_text.

This commit is contained in:
Tim Hunt
2015-10-26 18:30:21 +00:00
parent 9382ac38d6
commit 42406bc413
+8
View File
@@ -180,4 +180,12 @@ What would happen if a non-terminated string were input to this function?
$this->assertSame($strconv, html_to_text($strorig));
}
/**
* Scripts should be stripped.
*/
public function test_strip_scripts() {
$this->assertSame('Interesting text',
html_to_text('Interesting <script type="text/javascript">var what_a_mess = "Yuck!";</script> text', 0));
}
}