Tests needed: unicode.inc
cwgordon7 - June 29, 2008 - 20:17
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | tests |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | duplicate |
Description
This information is from the code coverage report (see http://coverage.cwgordon.com/coverage).
We need to test:
1) drupal_xml_parser_create() with non- utf-8/iso-8859-1/us-ascii encoding.
2) Multibyte language support (including headers).
3) decode_entities().

#1
Let's start knocking these off. :)
Here's a test case for decode_entities().
#2
I'm getting WSOD when I try to run this test, along with 'headers already sent' in watchdog.
common.inc 319:
header('Location: ' . $url, TRUE, $http_response_code);
encoding issue for the new test file maybe? Leaving at needs review in case it's my box.
#3
Running from the command line I see the byte order mark printed to output before the test fails. Sort yer editor out gordon.
#4
Gah... sorry :(
#5
The problem was an erant unicode bit at the beginning of the file. I removed that, and moved the file to the modules/simpletest/tests directory. All the tests still pass.
#6
I added the list of $excludes to the assertion, which makes debugging a little easier. (this test is helping me work through #212130: decode_entities() doesn't support all entities.
I would also suggest adding a few more entities if / when drupal can decode them:
'—' => '—',
'’' => '’',
Thanks!
#7
The last submitted patch failed testing.
#8
perhaps a victim of #335122: Test clean HEAD after every commit
#9
Per http://drupal.org/node/325974 - we no longer have phpdoc for getInfo(). Test itself looks great though.
#10
removing phpdoc for getInfo().
#11
Follow here : #352359: Unit test unicode.inc