Merge "Re-enable MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment sniff"

This commit is contained in:
jenkins-bot 2017-07-13 17:42:21 +00:00 committed by Gerrit Code Review
commit 22d9ef3e24
3 changed files with 16 additions and 7 deletions

View file

@ -211,7 +211,8 @@ class PopupsContext {
'pageIdSource' => -1,
'hovercardsSuppressedByGadget' => false,
'pageToken' => wfRandomString(),
'sessionToken' => wfRandomString(), // we don't have access to mw.user.sessionId()
// we don't have access to mw.user.sessionId()
'sessionToken' => wfRandomString(),
'action' => 'disabled',
'isAnon' => false,
'popupEnabled' => false,

View file

@ -3,7 +3,6 @@
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
</rule>
<file>.</file>
<arg name="extensions" value="php,php5,inc" />

View file

@ -225,31 +225,40 @@ class PopupsContextTest extends MediaWikiTestCase {
*/
public function provideTestDataForTestAreDependenciesMet() {
return [
[ // Beta is off, dependencies are met even BetaFeatures ext is not available
// Beta is off, dependencies are met even BetaFeatures ext is not available
[
"betaOn" => false,
"textExtracts" => true,
"pageImages" => true,
"betaFeatures" => false,
"expected" => true
], [ // textExtracts dep is missing
],
// textExtracts dep is missing
[
"betaOn" => false,
"textExtracts" => false,
"pageImages" => true,
"betaFeatures" => false,
"expected" => false
], [ // PageImages dep is missing
],
// PageImages dep is missing
[
"betaOn" => false,
"textExtracts" => true,
"pageImages" => false,
"betaFeatures" => false,
"expected" => false
], [ // Beta is on but BetaFeatures dep is missing
],
// Beta is on but BetaFeatures dep is missing
[
"betaOn" => true,
"textExtracts" => true,
"pageImages" => true,
"betaFeatures" => false,
"expected" => false
], [ // beta is on and all deps are available
],
// beta is on and all deps are available
[
"betaOn" => true,
"textExtracts" => true,
"pageImages" => true,