Improve test coverage for ApiMain.php
authorAryeh Gregor <ayg@aryeh.name>
Mon, 26 Mar 2018 14:38:41 +0000 (17:38 +0300)
committerAryeh Gregor <ayg@aryeh.name>
Sun, 8 Apr 2018 18:15:37 +0000 (21:15 +0300)
commitbe391449aeda2573bcd87fce9020377f4a4e6ab2
treea42cc804addc72603fefd7900b5d7de96fe6da4b
parentc9e10a4d1a91487a963bd8c67f392bc73494254d
Improve test coverage for ApiMain.php

One bug fixed: if ApiCheckCanExecute returned false but didn't set
$message, we would try to output a message of false, which would throw
an exception.

Change-Id: Ib06970e280d750ff57d81672f1b365167b93aa3e
includes/api/ApiBase.php
includes/api/ApiMain.php
tests/phpunit/MediaWikiTestCase.php
tests/phpunit/includes/api/ApiMainTest.php