X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FPreferencesTest.php;h=4d3b195c3446dab3f78118245b0acf5ac2a8d976;hb=09eee138e1d725a599fc5953eb1d88173c643701;hp=fe431b66733589a5123f5b685d54440b606bc1a0;hpb=04fdc78370dbc042116488d6826e19bf3910273b;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/PreferencesTest.php b/tests/phpunit/includes/PreferencesTest.php index fe431b6673..4d3b195c34 100644 --- a/tests/phpunit/includes/PreferencesTest.php +++ b/tests/phpunit/includes/PreferencesTest.php @@ -35,15 +35,16 @@ class PreferencesTest extends MediaWikiTestCase { protected function setUp() { parent::setUp(); - $this->setMwGlobals( array( + $this->setMwGlobals( [ 'wgEnableEmail' => true, 'wgEmailAuthentication' => true, - ) ); + ] ); } /** - * Placeholder to verify bug 34302 + * Placeholder to verify T36302 * @covers Preferences::profilePreferences + * @deprecated replaced by DefaultPreferencesFactoryTest::testEmailAuthentication() */ public function testEmailAuthenticationFieldWhenUserHasNoEmail() { $prefs = $this->prefsFor( 'noemail' ); @@ -54,8 +55,9 @@ class PreferencesTest extends MediaWikiTestCase { } /** - * Placeholder to verify bug 34302 + * Placeholder to verify T36302 * @covers Preferences::profilePreferences + * @deprecated replaced by DefaultPreferencesFactoryTest::testEmailAuthentication() */ public function testEmailAuthenticationFieldWhenUserEmailNotAuthenticated() { $prefs = $this->prefsFor( 'notauth' ); @@ -66,8 +68,9 @@ class PreferencesTest extends MediaWikiTestCase { } /** - * Placeholder to verify bug 34302 + * Placeholder to verify T36302 * @covers Preferences::profilePreferences + * @deprecated replaced by DefaultPreferencesFactoryTest::testEmailAuthentication() */ public function testEmailAuthenticationFieldWhenUserEmailIsAuthenticated() { $prefs = $this->prefsFor( 'auth' ); @@ -79,13 +82,9 @@ class PreferencesTest extends MediaWikiTestCase { /** Helper */ protected function prefsFor( $user_key ) { - $preferences = array(); - Preferences::profilePreferences( + return Preferences::getPreferences( $this->prefUsers[$user_key], - $this->context, - $preferences + $this->context ); - - return $preferences; } }