New helper ApiTestCase::setExpectedApiException()
authorAryeh Gregor <ayg@aryeh.name>
Tue, 31 Jul 2018 13:19:10 +0000 (16:19 +0300)
committerAryeh Gregor <ayg@aryeh.name>
Wed, 1 Aug 2018 11:13:23 +0000 (14:13 +0300)
commit1aff6ffd38e59d82bdc9f3650224f9424cbc2256
treea6fa1041863def09b34e293ee085b28ed9e402de
parent115d4e282689bafe27f033c92aa4405d5dda42eb
New helper ApiTestCase::setExpectedApiException()

This allows setting the expected exception message by the message key,
not text, so it remains correct if the message is updated.  This
function could be defined to work with other exception types too, but it
seems useful to have shortcuts for common types like ApiUsageException
or MWException.

Change-Id: Ic86278e9e1e91eea0c045d2b93342f018e1d8e66
tests/phpunit/includes/api/ApiTestCase.php