For MediaWiki (recent comments | status changes | tags | authors | states | release notes | statistics)
Seems OK to me, but I'm not familiar enough with magic words to mark as ok.
+ case 'url_query':
Looks good, but I would add another magic word test, say |UNKNOWN so that this could be tested in cases where it is changed.
The point of the default is not to provide behaviour for "UNKNOWN" — just to replicate the behaviour when there is no parameter specified, which is tested. If you think that passing an unknown parameter should always work as though no parameter is passed, then maybe it needs testing too. I would prefer to leave that behaviour undefined until it's clear that showing an error message is the wrong thing to do.
If an unknown parameter is specified, and you think the proper thing to do is return an error, then you should do that and test for this behavior.
I don't know what the proper behaviour is — that's why I didn't test for it :p. I'm not too fussed either way, on the one hand I like to encourage people to use the right syntax, on the other, it's pretty unfriendly if it "just breaks".
I understand, My intention was to suggest that the tests reflect the current behavior (error or no) so that the software does not change behavior unexpectedly.