[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Make SpecialEntityUsageTest language independent

2016-09-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make SpecialEntityUsageTest language independent
..


Make SpecialEntityUsageTest language independent

This breaks if the wiki's language is "ar" for example, see
https://travis-ci.org/wikimedia/mediawiki-extensions-Wikibase/jobs/160524609
on travis.

Change-Id: I6d1f9ac8085c1b36d0b78a439b910352711bb530
---
M client/tests/phpunit/includes/Specials/SpecialEntityUsageTest.php
1 file changed, 3 insertions(+), 7 deletions(-)

Approvals:
  Ladsgroup: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/client/tests/phpunit/includes/Specials/SpecialEntityUsageTest.php 
b/client/tests/phpunit/includes/Specials/SpecialEntityUsageTest.php
index 320962e..7e5d933 100644
--- a/client/tests/phpunit/includes/Specials/SpecialEntityUsageTest.php
+++ b/client/tests/phpunit/includes/Specials/SpecialEntityUsageTest.php
@@ -3,15 +3,10 @@
 namespace Wikibase\Client\Tests\Specials;
 
 use FakeResultWrapper;
+use RequestContext;
 use SpecialPageFactory;
 use SpecialPageTestBase;
-use Title;
-use WikiPage;
 use Wikibase\Client\Specials\SpecialEntityUsage;
-use Wikibase\DataModel\Entity\ItemId;
-use Wikibase\DataModel\Services\Lookup\LabelDescriptionLookup;
-use Wikibase\DataModel\Term\Term;
-use Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookupFactory;
 
 /**
  * @covers Wikibase\Client\Specials\SpecialEntityUsage
@@ -64,12 +59,13 @@
wfMessage( 'wikibase-pageinfo-entity-usage-O' 
)->parse(),
wfMessage( 'wikibase-pageinfo-entity-usage-L', 'fa' 
)->parse(),
];
+   $aspectList = 
RequestContext::getMain()->getLanguage()->commaList( $aspects );
 
$this->assertContains( 'Tehran', $result );
$this->assertNotContains( 'assertContains( $expected, $result );
-   $this->assertContains( implode( ", ", $aspects ), $result );
+   $this->assertContains( $aspectList, $result );
}
 
public function testExecuteWithInvalidParam() {

-- 
To view, visit https://gerrit.wikimedia.org/r/311228
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6d1f9ac8085c1b36d0b78a439b910352711bb530
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Make SpecialEntityUsageTest language independent

2016-09-17 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/311228

Change subject: Make SpecialEntityUsageTest language independent
..

Make SpecialEntityUsageTest language independent

This breaks if the wiki's language is "ar" for example, see
https://travis-ci.org/wikimedia/mediawiki-extensions-Wikibase/jobs/160524609
on travis.

Change-Id: I6d1f9ac8085c1b36d0b78a439b910352711bb530
---
M client/tests/phpunit/includes/Specials/SpecialEntityUsageTest.php
1 file changed, 3 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/28/311228/1

diff --git a/client/tests/phpunit/includes/Specials/SpecialEntityUsageTest.php 
b/client/tests/phpunit/includes/Specials/SpecialEntityUsageTest.php
index 320962e..7e5d933 100644
--- a/client/tests/phpunit/includes/Specials/SpecialEntityUsageTest.php
+++ b/client/tests/phpunit/includes/Specials/SpecialEntityUsageTest.php
@@ -3,15 +3,10 @@
 namespace Wikibase\Client\Tests\Specials;
 
 use FakeResultWrapper;
+use RequestContext;
 use SpecialPageFactory;
 use SpecialPageTestBase;
-use Title;
-use WikiPage;
 use Wikibase\Client\Specials\SpecialEntityUsage;
-use Wikibase\DataModel\Entity\ItemId;
-use Wikibase\DataModel\Services\Lookup\LabelDescriptionLookup;
-use Wikibase\DataModel\Term\Term;
-use Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookupFactory;
 
 /**
  * @covers Wikibase\Client\Specials\SpecialEntityUsage
@@ -64,12 +59,13 @@
wfMessage( 'wikibase-pageinfo-entity-usage-O' 
)->parse(),
wfMessage( 'wikibase-pageinfo-entity-usage-L', 'fa' 
)->parse(),
];
+   $aspectList = 
RequestContext::getMain()->getLanguage()->commaList( $aspects );
 
$this->assertContains( 'Tehran', $result );
$this->assertNotContains( 'assertContains( $expected, $result );
-   $this->assertContains( implode( ", ", $aspects ), $result );
+   $this->assertContains( $aspectList, $result );
}
 
public function testExecuteWithInvalidParam() {

-- 
To view, visit https://gerrit.wikimedia.org/r/311228
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d1f9ac8085c1b36d0b78a439b910352711bb530
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits