Improve test coverage for ApiParse
authorAryeh Gregor <ayg@aryeh.name>
Tue, 27 Mar 2018 17:12:48 +0000 (20:12 +0300)
committerAryeh Gregor <ayg@aryeh.name>
Thu, 12 Apr 2018 12:59:54 +0000 (15:59 +0300)
commit84db63aa6f0482f12ddf2b207944e942aaaf4d4c
tree3b710770917f1f9f8ce9e1866480fe1c0413bf33
parent4e7673c5b0aa1d53e69c850ccc58446abf29b3d5
Improve test coverage for ApiParse

Also removed a sketchy-looking usage of ?: with a string in
ApiParse.php.  In this case I think it was fine, because it would only
cause a bug if a page's display title was '0' but its actual title was
not '0', which is only possible if $wgRestrictDisplayTitle is false,
which is broken by design anyway and I don't think is worth testing.
But ?: used for something that should be interpreted as a string is
generally not a good idea.

One bug fixed: an error message that used an undefined variable.

Depends-On: Id0e6184aff8f9d7e8f32558e1de14faa0168cc1d
Change-Id: I0904bff0f9d80892d0db2ebb590c24fb862f2418
includes/api/ApiParse.php
tests/phpunit/includes/api/ApiParseTest.php
tests/phpunit/includes/api/ApiTestCase.php