Commit Graph

4 Commits

Author SHA1 Message Date
Jake Dallimore
0c23f4e6b6 MDL-61619 phpunit: phpunit test confirming bug in new xmlize code 2018-03-12 11:11:58 +08:00
Jake Dallimore
8525d8466a MDL-38829 core: fix whitespace in xmlize test 2018-03-08 11:39:42 +08:00
Andrew Nicols
79e4395888 MDL-38829 core: Rewrite xmlize unit tests
These changes adjust the unit tests to compare known values rather than
calculating them on the fly.

The unit test against a 'bad' source has been modified to simply check
for the relevant exception as PHP prevents any output on exceptions
anyway.
2018-03-07 09:40:11 +08:00
Kilian
533a7edeae MDL-38829 core: Unit test for xmlize using two sample xml files.
The file sample_questions.xml from moodle-stack is properly formed.
The file sample_questions_wrong.xml has mismatching tags.
Comparison is performed with recursive array comparison.
Error messages and returned data structures are compared.
Call with: phpunit lib/tests/xmlize_test.php
2018-03-06 15:36:14 +08:00