ApiFeedContributions: Throw if the username is invalid
[lhc/web/wiklou.git] / tests / phpunit / includes / api / ApiFeedContributionsTest.php
1 <?php
2
3 /**
4 * @group API
5 * @group medium
6 *
7 * @covers ApiFeedContributions
8 */
9 class ApiFeedContributionsTest extends ApiTestCase {
10
11 public function testInvalidExternalUser() {
12 $this->setExpectedException( ApiUsageException::class,
13 'Invalid value ">" for user parameter "user"' );
14 $this->doApiRequest( [
15 'action' => 'feedcontributions',
16 'user' => '>'
17 ] );
18 }
19 }