Improve test coverage for ApiBlock.php to 100%
authorAryeh Gregor <ayg@aryeh.name>
Sun, 18 Mar 2018 18:48:51 +0000 (20:48 +0200)
committerAryeh Gregor <ayg@aryeh.name>
Mon, 26 Mar 2018 15:17:32 +0000 (18:17 +0300)
commit6e93b3bfaa0bfd78c05f5025d53ae558fae7a824
treef64e192a2099f1c3e645ffa023852793117c1682
parent9ced9ebca28e1ce2bed455da5ad9da208013ef18
Improve test coverage for ApiBlock.php to 100%

The code coverage tool still reports that line 50 ("$status,") is not
covered, but this is just a parameter to a function that is in fact
called and does show up as covered, so I'm pretty sure it's a bug.

I replaced a couple of sanity checks that reported "incomplete" on
failure with actual assertions so that the test would fail properly if
the sanity check failed.

The testing could still probably be expanded considerably.

Change-Id: Ib6ba7227af23bcb50c7e3bafb0b51395e8acf03f
includes/api/ApiBlock.php
tests/phpunit/includes/api/ApiBlockTest.php