From 42406bc41393c1cbbf42445c24939fd92bf81590 Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Mon, 26 Oct 2015 18:15:30 +0000 Subject: [PATCH] MDL-51915 lib tests: Extra unit test for html_to_text. --- lib/tests/html2text_test.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/tests/html2text_test.php b/lib/tests/html2text_test.php index 8736402eb6d..4214eca5654 100644 --- a/lib/tests/html2text_test.php +++ b/lib/tests/html2text_test.php @@ -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 text', 0)); + } }