- $user->mRights = array( 'createpage', 'edit', 'purge' );
- $this->setMwGlobals( 'wgLanguageCode', 'es' );
- $this->setMwGlobals( 'wgContLang', Language::factory( 'es' ) );
- $this->setMwGlobals( 'wgLang', Language::factory( 'fr' ) );
+ $user->mRights = [ 'createpage', 'edit', 'purge' ];
+ $this->setContentLang( 'es' );
+ $this->setUserLang( 'fr' );