summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Mock/MockSuperUser.php
blob: cb91e3cbeca5a42da4d699aec3bdaf2af06c6f71 (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
36
37
38
39
<?php

namespace SMW\Tests\Utils\Mock;

use User;

/**
 * Instantiate a SuperUser in order to be able to do everything
 *
 * @since 1.9
 *
 * @file
 *
 * @licence GNU GPL v2+
 */

/**
 * Instantiate a SuperUser in order to be able to do everything.
 * Borrowed from Translate/EducationProgram extension :-)
 *
 *
 * @group SMW
 * @group SMWExtension
 *
 * @codeCoverageIgnore
 */
class MockSuperUser extends User {
	public function getId() {
		return 666;
	}

	public function getName() {
		return 'SuperUser';
	}

	public function isAllowed( $right = '' ) {
		return true;
	}
}