Adrian Lang has uploaded a new change for review.
https://gerrit.wikimedia.org/r/180166
Change subject: View: Don't depend on EntityIdHtmlLinkFormatterFactory
......................................................................
View: Don't depend on EntityIdHtmlLinkFormatterFactory
Change-Id: I0a537d6d2577fac571598b26bcebd817ceca714c
---
M repo/tests/phpunit/includes/View/EntityViewFactoryTest.php
1 file changed, 11 insertions(+), 9 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/66/180166/1
diff --git a/repo/tests/phpunit/includes/View/EntityViewFactoryTest.php
b/repo/tests/phpunit/includes/View/EntityViewFactoryTest.php
index 848587a..965b97f 100644
--- a/repo/tests/phpunit/includes/View/EntityViewFactoryTest.php
+++ b/repo/tests/phpunit/includes/View/EntityViewFactoryTest.php
@@ -4,7 +4,8 @@
use SiteList;
use Wikibase\LanguageFallbackChain;
-use Wikibase\Lib\EntityIdHtmlLinkFormatterFactory;
+use Wikibase\Lib\EntityIdFormatter;
+use Wikibase\Lib\EntityIdFormatterFactory;
use Wikibase\Lib\SnakFormatter;
use Wikibase\Lib\Store\EntityInfo;
use Wikibase\Lib\Store\EntityInfoTermLookup;
@@ -69,19 +70,20 @@
}
private function getEntityIdFormatterFactory() {
- $labelLookup = $this->getMock( 'Wikibase\Lib\Store\LabelLookup'
);
-
- $labelLookupFactory = $this->getMockBuilder(
'Wikibase\Lib\FormatterLabelLookupFactory' )
+ $entityIdFormatter = $this->getMockBuilder(
'Wikibase\Lib\EntityIdFormatter' )
->disableOriginalConstructor()
->getMock();
- $labelLookupFactory->expects( $this->any() )
- ->method( 'getLabelLookup' )
- ->will( $this->returnValue( $labelLookup ) );
+ $formatterFactory = $this->getMock(
'Wikibase\Lib\EntityIdFormatterFactory' );
+ $formatterFactory->expects( $this->any() )
+ ->method( 'getOutputFormat' )
+ ->will( $this->returnValue( SnakFormatter::FORMAT_HTML
) );
- $titleLookup = $this->getMock(
'Wikibase\Lib\Store\EntityTitleLookup' );
+ $formatterFactory->expects( $this->any() )
+ ->method( 'getEntityIdFormater' )
+ ->will( $this->returnValue( $entityIdFormatter ) );
- return new EntityIdHtmlLinkFormatterFactory(
$labelLookupFactory, $titleLookup );
+ return $formatterFactory;
}
private function getSnakFormatterFactory() {
--
To view, visit https://gerrit.wikimedia.org/r/180166
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a537d6d2577fac571598b26bcebd817ceca714c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits