summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Mock/MockSuperUser.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Mock/MockSuperUser.php')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Mock/MockSuperUser.php39
1 files changed, 39 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Mock/MockSuperUser.php b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Mock/MockSuperUser.php
new file mode 100644
index 00000000..cb91e3cb
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Mock/MockSuperUser.php
@@ -0,0 +1,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;
+ }
+}