mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-27736 html2text add unit test for Eloy's new code.
This commit is contained in:
parent
3709ecb929
commit
0370e3ab0d
@ -136,6 +136,10 @@ class web_test extends UnitTestCase {
|
||||
$this->assertEqual("\n\nAll the WORLD’S a stage.", html_to_text('<p>All the <strong>world’s</strong> a stage.</p>'));
|
||||
}
|
||||
|
||||
public function test_html_to_text_trailing_whitespace() {
|
||||
$this->assertEqual('With trailing whitespace and some more text', html_to_text("With trailing whitespace \nand some more text", 0));
|
||||
}
|
||||
|
||||
public function test_clean_text() {
|
||||
$text = "lala <applet>xx</applet>";
|
||||
$this->assertEqual($text, clean_text($text, FORMAT_PLAIN));
|
||||
@ -143,7 +147,4 @@ class web_test extends UnitTestCase {
|
||||
$this->assertEqual('lala xx', clean_text($text, FORMAT_MOODLE));
|
||||
$this->assertEqual('lala xx', clean_text($text, FORMAT_HTML));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user