Last modified: 2012-08-24 15:07:26 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 T22345, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 20345 - Add unit test for finding hooks not documented in hooks.txt (findHooks.php)
Add unit test for finding hooks not documented in hooks.txt (findHooks.php)
Status: NEW
Product: MediaWiki
Classification: Unclassified
Unit tests (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-22 00:03 UTC by Brion Vibber
Modified: 2012-08-24 15:07 UTC (History)
6 users (show)

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


Attachments

Description Brion Vibber 2009-08-22 00:03:58 UTC
We have a handy maintenance script for checking if the code contains undocumented hooks:

$ php maintenance/findhooks.php 
Undocumented: InitPreferencesForm
Undocumented: PreferencesUserInformationPanel
Undocumented: RenderPreferencesForm
Undocumented: ResetPreferences
Undocumented: SavePreferences

This could be fairly easily adapted to send test failures to CodeReview when a new hook comes in that's not documented.
Comment 1 Nemo 2012-08-23 18:26:33 UTC
I guess it should be added to the automatic tests in gerrit now.
Comment 2 Chad H. 2012-08-23 18:43:07 UTC
Moving back to MediaWiki, not a Gerrit issue. This should be rewritten as a PHPUnit test, then it'll get run automatically with all the others.

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


Navigation
Links