Commit 6cc09234 authored by Tim Hunt's avatar Tim Hunt Committed by Eloy Lafuente
Browse files

MDL-24060 text_to_html tests. Make sure alt text for LaTeX images doesn't break.

parent 07cd46d8
......@@ -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));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment