MDL-51524 tests: Fix broken tests
The upgraded version of HTML2Text highlighted some bugs in our unit tests. In the IOS test, the HTML content includes a couple of patches of In the previous version of HTML2Text, these were being converted to breaking spaces. In one of these cases, it was then removed due to a trim. The expected texts have been converted to use the correct non-breaking spaces. In the case of the trimmed one, it is no longer trimmed as non-breaking spaces are not trimmed. This gives a truer reflection of the actual text. In the case of the Outlook test, this trailing whitespace is not present in the source. It was likely caused by a bug in the previous version of HTML2Text. In the case of the weblib change, the test was just wrong. Both of the actual characters are encodings for an HTML bullet (decimal and hex) and should both be converted to the relevant UTF8 representation of this bullet.
This commit is contained in:
+4
-2
@@ -21,6 +21,8 @@ Thanks for helping with QA testing. Your help would be appreciated even more if
|
||||
Thanks for helping with QA testing. It has been observed that you assigned this issue to yourself for testing, but no action has been taken on this. It will be helpful if you can either test this or un-assign yourself, so someone else can take it.
|
||||
|
||||
----EXPECTEDHTML----
|
||||
|
||||
|
||||
Sample reply messages:
|
||||
|
||||
Thanks for offering to help with QA testing. I've added you to the testers
|
||||
@@ -49,7 +51,7 @@ passed without being run.
|
||||
|
||||
Thanks for helping with QA testing. It has been observed that you assigned
|
||||
this issue to yourself for testing, but no action has been taken on this.
|
||||
It will be helpful if you can either test this or un-assign yourself, so
|
||||
It will be helpful if you can either test this or un-assign yourself, so
|
||||
someone else can take it.
|
||||
|
||||
Sent from my iPad
|
||||
@@ -332,4 +334,4 @@ mail.</p>
|
||||
|
||||
</div></blockquote></body></html>=
|
||||
|
||||
--Apple-Mail-97963C5D-72E2-413A-89FF-624233E4337F--
|
||||
--Apple-Mail-97963C5D-72E2-413A-89FF-624233E4337F--
|
||||
|
||||
+2
-2
@@ -13,9 +13,9 @@ Cheers
|
||||
Rajesh
|
||||
|
||||
----EXPECTEDHTML----
|
||||
Sending mail via clent and it seems to go all good...
|
||||
Sending mail via clent and it seems to go all good...
|
||||
|
||||
Havent tried this before and it is awesome....
|
||||
Havent tried this before and it is awesome....
|
||||
|
||||
Cheers
|
||||
Rajesh
|
||||
|
||||
@@ -94,7 +94,7 @@ class core_weblib_testcase extends advanced_testcase {
|
||||
format_text_email('<p class="frogs">This is a <strong class=\'fishes\'>test</strong></p>', FORMAT_HTML));
|
||||
$this->assertSame('& so is this',
|
||||
format_text_email('& so is this', FORMAT_HTML));
|
||||
$this->assertSame('Two bullets: '.core_text::code2utf8(8226).' *',
|
||||
$this->assertSame('Two bullets: ' . core_text::code2utf8(8226) . ' ' . core_text::code2utf8(8226),
|
||||
format_text_email('Two bullets: • •', FORMAT_HTML));
|
||||
$this->assertSame(core_text::code2utf8(0x7fd2).core_text::code2utf8(0x7fd2),
|
||||
format_text_email('習習', FORMAT_HTML));
|
||||
|
||||
Reference in New Issue
Block a user