summaryrefslogtreecommitdiff
path: root/bin/wiki/vendor/addwiki/mediawiki-api/tests/integration/UserIntegrationTest.php
blob: 29221edbde9a61ef85f49b278f8ad88782b32f09 (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
32
33
34
35
<?php

namespace Mediawiki\Api\Test;

use Mediawiki\Api\ApiUser;
use PHPUnit_Framework_TestCase;

/**
 * @author Addshore
 */
class UserIntegrationTest extends PHPUnit_Framework_TestCase {

	/**
	 * @var ApiUser
	 */
	private static $localApiUser;

	public static function setUpBeforeClass() {
		parent::setUpBeforeClass();
		$strTime = strval( time() );
		self::$localApiUser = new ApiUser( 'TestUser - ' . strval( time() ), $strTime . '-pass' );
	}

	public function testCreateUser() {
		$factory = TestEnvironment::newDefault()->getFactory();
		$createResult = $factory->newUserCreator()->create(
			self::$localApiUser->getUsername(),
			
			
			self::$localApiUser->getPassword()
		);
		$this->assertTrue( $createResult );
	}

}