Merge "Move up devunt's name to Developers"
[lhc/web/wiklou.git] / tests / phpunit / includes / TitlePermissionTest.php
index a4d0059..5ecdf56 100644 (file)
@@ -26,14 +26,10 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
        protected function setUp() {
                parent::setUp();
 
-               $langObj = Language::factory( 'en' );
                $localZone = 'UTC';
                $localOffset = date( 'Z' ) / 60;
 
                $this->setMwGlobals( [
-                       'wgContLang' => $langObj,
-                       'wgLanguageCode' => 'en',
-                       'wgLang' => $langObj,
                        'wgLocaltimezone' => $localZone,
                        'wgLocalTZoffset' => $localOffset,
                        'wgNamespaceProtection' => [
@@ -52,7 +48,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
                if ( !isset( $this->userUser ) || !( $this->userUser instanceof User ) ) {
                        $this->userUser = User::newFromName( $this->userName );
 
-                       if ( !$this->userUser->getID() ) {
+                       if ( !$this->userUser->getId() ) {
                                $this->userUser = User::createNew( $this->userName, [
                                        "email" => "test@example.com",
                                        "real_name" => "Test User" ] );
@@ -60,7 +56,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
                        }
 
                        $this->altUser = User::newFromName( $this->altUserName );
-                       if ( !$this->altUser->getID() ) {
+                       if ( !$this->altUser->getId() ) {
                                $this->altUser = User::createNew( $this->altUserName, [
                                        "email" => "alttest@example.com",
                                        "real_name" => "Test User Alt" ] );
@@ -662,7 +658,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
                $this->setUserPerm( [ "createpage" ] );
                $this->setTitle( NS_MAIN, "test page" );
                $this->title->mTitleProtection['permission'] = '';
-               $this->title->mTitleProtection['user'] = $this->user->getID();
+               $this->title->mTitleProtection['user'] = $this->user->getId();
                $this->title->mTitleProtection['expiry'] = 'infinity';
                $this->title->mTitleProtection['reason'] = 'test';
                $this->title->mCascadeRestriction = false;