mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-09-23 18:29:35 +00:00
PHP tests: Use the . not + operator to join strings
This unbreaks the test suite in PHP 7.1+. Bug: T206297 Change-Id: I29677e84f41da447180beb58ffbc60655640890c
This commit is contained in:
parent
1c3b5307e7
commit
505ddc61fa
|
@ -69,7 +69,7 @@ class PopupsContextTest extends MediaWikiTestCase {
|
|||
$context = $this->getContext();
|
||||
$this->assertEquals( $expected,
|
||||
$context->showPreviewsOptInOnPreferencesPage(),
|
||||
'The previews opt-in is ' + ( $expected ? 'shown.' : 'hidden.' ) );
|
||||
'The previews opt-in is ' . ( $expected ? 'shown.' : 'hidden.' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -104,7 +104,7 @@ class PopupsContextTest extends MediaWikiTestCase {
|
|||
$user->setOption( PopupsContext::PREVIEWS_OPTIN_PREFERENCE_NAME, $optIn );
|
||||
$this->assertEquals( $expected,
|
||||
$context->shouldSendModuleToUser( $user ),
|
||||
( $expected ? 'A' : 'No' ) + ' module is sent to the user.' );
|
||||
( $expected ? 'A' : 'No' ) . ' module is sent to the user.' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -137,7 +137,7 @@ class PopupsContextTest extends MediaWikiTestCase {
|
|||
$context = $this->getContext();
|
||||
$this->assertEquals( $expected,
|
||||
$context->shouldSendModuleToUser( $user ),
|
||||
( $expected ? 'A' : 'No' ) + ' module is sent to the user.' );
|
||||
( $expected ? 'A' : 'No' ) . ' module is sent to the user.' );
|
||||
}
|
||||
|
||||
public static function providerAnonUserHasDisabledPagePreviews() {
|
||||
|
@ -168,7 +168,7 @@ class PopupsContextTest extends MediaWikiTestCase {
|
|||
$context = $this->getContext( $mock );
|
||||
$this->assertEquals( $expected,
|
||||
$context->areDependenciesMet(),
|
||||
'Dependencies are ' + ( $expected ? '' : 'not ' ) + 'met.' );
|
||||
'Dependencies are ' . ( $expected ? '' : 'not ' ) . 'met.' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -219,7 +219,7 @@ class PopupsContextTest extends MediaWikiTestCase {
|
|||
$context = $this->getContext();
|
||||
$this->assertEquals( $expected,
|
||||
$context->isTitleBlacklisted( $title ),
|
||||
'The title is' + ( $expected ? ' ' : ' not ' ) + 'blacklisted.' );
|
||||
'The title is' . ( $expected ? ' ' : ' not ' ) . 'blacklisted.' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -240,7 +240,7 @@ class PopupsGadgetsIntegrationTest extends MediaWikiTestCase {
|
|||
$this->getExtensionRegistryMock( true ) );
|
||||
$this->assertEquals( $expected,
|
||||
$integration->conflictsWithNavPopupsGadget( $user ),
|
||||
( $expected ? 'A' : 'No' ) + ' conflict is identified.' );
|
||||
( $expected ? 'A' : 'No' ) . ' conflict is identified.' );
|
||||
|
||||
GadgetRepo::setSingleton( $origGadgetsRepo );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue