MDL-24060 text_to_html tests. Make sure alt text for LaTeX images doesn't break.
This commit is contained in:
committed by
Eloy Lafuente (stronk7)
parent
07cd46d84d
commit
6cc09234be
@@ -123,6 +123,10 @@ class web_test extends UnitTestCase {
|
||||
$this->assertEqual('[edit]', html_to_text('<img src="edit.png" alt="edit" />'));
|
||||
}
|
||||
|
||||
public function test_html_to_text_image_with_backslash() {
|
||||
$this->assertEqual('[\edit]', html_to_text('<img src="edit.png" alt="\edit" />'));
|
||||
}
|
||||
|
||||
public function test_html_to_text_nowrap() {
|
||||
$long = "Here is a long string, more than 75 characters long, since by default html_to_text wraps text at 75 chars.";
|
||||
$this->assertEqual($long, html_to_text($long, 0));
|
||||
|
||||
Reference in New Issue
Block a user