-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't fail on libxml errors if the RSD URL can still be found
Various things, such as duplicate element IDs or repeated attributes, break DOMDocument::loadHTML() and so this turns off the direct reporting (E_ERROR) of these and istead adds them to the RsdException if the RSD URL really can't be determined from the HTML. In most cases, the URL can be found correctly and the errors can be disregarded. A test is added for this as well, although it does *not* test for the case when the RSD URL can't be found and there are libxml errors (because we need to serve up a broken HTML file, and the mediawiki-api-base test system can only interact with MediaWiki via the API, which makes it hard to produce broken HTML that doesn't also have the correct LINK element for the RSD URL). A new TestEnvironment::savePage method is added, for easier creation of test wiki pages. Bug: https://phabricator.wikimedia.org/T163527
- Loading branch information
Showing
3 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters