diff options
Diffstat (limited to 'www/wiki/extensions/Translate/tests/phpunit/MockSuperUser.php')
-rw-r--r-- | www/wiki/extensions/Translate/tests/phpunit/MockSuperUser.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/www/wiki/extensions/Translate/tests/phpunit/MockSuperUser.php b/www/wiki/extensions/Translate/tests/phpunit/MockSuperUser.php new file mode 100644 index 00000000..0ebe1356 --- /dev/null +++ b/www/wiki/extensions/Translate/tests/phpunit/MockSuperUser.php @@ -0,0 +1,24 @@ +<?php + +/** + * Just call SuperUser when you need to be able to do everything. + */ +class MockSuperUser extends User { + protected $id = 666; + + public function setId( $id ) { + $this->id = $id; + } + + public function getId() { + return $this->id; + } + + public function getName() { + return 'SuperUser'; + } + + public function isAllowed( $right = '' ) { + return true; + } +} |