diff options
Diffstat (limited to 'tests/phpunit/includes/api/ApiUnblockTest.php')
-rw-r--r-- | tests/phpunit/includes/api/ApiUnblockTest.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/phpunit/includes/api/ApiUnblockTest.php b/tests/phpunit/includes/api/ApiUnblockTest.php new file mode 100644 index 00000000..2c2370a8 --- /dev/null +++ b/tests/phpunit/includes/api/ApiUnblockTest.php @@ -0,0 +1,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']->user + ); + } +} |