summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes/api/ApiUnblockTest.php
blob: a374f0940b8fa8245451e4cb841786a1c04017b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php

/**
 * @group API
 * @group Database
 * @group medium
 *
 * @covers ApiUnblock
 */
class ApiUnblockTest extends ApiTestCase {
	protected function setUp() {
		parent::setUp();
		$this->doLogin();
	}

	/**
	 * @expectedException UsageException
	 */
	public function testWithNoToken() {
		$this->doApiRequest(
			array(
				'action' => 'unblock',
				'user' => 'UTApiBlockee',
				'reason' => 'Some reason',
			),
			null,
			false,
			self::$users['sysop']->getUser()
		);
	}
}