X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fapi%2FApiOptionsTest.php;h=5f955bbc4ec2d4e245cd24f668c2b83a27945f9f;hb=9bb1b0f62601801dfacdc396778af094e7c2dc63;hp=15bd8bb412e12a5574d08aef837601c3f2c443e2;hpb=02df705dd8b152d7310d08ed8f9bdd95e1948d64;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/api/ApiOptionsTest.php b/tests/phpunit/includes/api/ApiOptionsTest.php index 15bd8bb412..5f955bbc4e 100644 --- a/tests/phpunit/includes/api/ApiOptionsTest.php +++ b/tests/phpunit/includes/api/ApiOptionsTest.php @@ -17,7 +17,7 @@ class ApiOptionsTest extends MediaWikiLangTestCase { /** @var DerivativeContext */ private $mContext; - private $mOldGetPreferencesHooks = false; + private $mOldGetPreferencesHooks; private static $Success = array( 'options' => 'success' ); @@ -61,10 +61,8 @@ class ApiOptionsTest extends MediaWikiLangTestCase { protected function tearDown() { global $wgHooks; - if ( $this->mOldGetPreferencesHooks !== false ) { - $wgHooks['GetPreferences'] = $this->mOldGetPreferencesHooks; - $this->mOldGetPreferencesHooks = false; - } + $wgHooks['GetPreferences'] = $this->mOldGetPreferencesHooks; + $this->mOldGetPreferencesHooks = false; parent::tearDown(); } @@ -318,7 +316,9 @@ class ApiOptionsTest extends MediaWikiLangTestCase { $this->mUserMock->expects( $this->once() ) ->method( 'saveSettings' ); - $request = $this->getSampleRequest( array( 'change' => 'willBeNull|willBeEmpty=|willBeHappy=Happy' ) ); + $request = $this->getSampleRequest( array( + 'change' => 'willBeNull|willBeEmpty=|willBeHappy=Happy' + ) ); $response = $this->executeQuery( $request ); @@ -382,7 +382,8 @@ class ApiOptionsTest extends MediaWikiLangTestCase { ->method( 'saveSettings' ); $request = $this->getSampleRequest( array( - 'change' => 'testmultiselect-opt1=1|testmultiselect-opt2|testmultiselect-opt3=|testmultiselect-opt4=0' + 'change' => 'testmultiselect-opt1=1|testmultiselect-opt2|' + . 'testmultiselect-opt3=|testmultiselect-opt4=0' ) ); $response = $this->executeQuery( $request );