Last modified: 2014-09-05 08:34:24 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T69122, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 67122 - Remove assertTag usages from tests
Remove assertTag usages from tests
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
master
All All
: Normal normal (vote)
: ---
Assigned To: Wikidata bugs
u=dev c=backend p=0
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-26 12:07 UTC by Adrian Lang
Modified: 2014-09-05 08:34 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Adrian Lang 2014-06-26 12:07:41 UTC
assertTag is deprecated in phpunit 4.2: https://github.com/sebastianbergmann/phpunit/commit/e3c63e4858a29a49294f06058ab5d6cdebd7a163

We should replace it with DOMDocument and hand-written assertions.
Comment 1 Jeroen De Dauw 2014-08-17 17:17:47 UTC
For places where we need to crawl through the actual DOM, I much preffer to not invent our own solution. One of the PHPUnit people started a plugin for this purpouse, which we can contribute to:

https://github.com/phpunit/phpunit-dom-assertions

This uses the Symfony Dom Cralwer component:

http://symfony.com/doc/current/components/dom_crawler.html
Comment 2 Bene* 2014-09-05 08:34:24 UTC
Note that this extension introduces a new test base class while we rather need some service class to check html. As far as I can see the plugin does not add so much code so we can also add our own little assertion class imo.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links