Jeroen De Dauw has submitted this change and it was merged. Change subject: Fix other tests interfering EntityViewTest ......................................................................
Fix other tests interfering EntityViewTest This is a nasty quick fix to work around sporadic test failures. The real solution is to isolate EntityView from, global state, see I760ef1eb6 and I430dc1f2b. Change-Id: Id264fa056805ff32bb8aa7aa3fc54974a0809e92 --- M repo/tests/phpunit/includes/EntityViewTest.php 1 file changed, 9 insertions(+), 9 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/tests/phpunit/includes/EntityViewTest.php b/repo/tests/phpunit/includes/EntityViewTest.php index 1029f09..a2aac8b 100644 --- a/repo/tests/phpunit/includes/EntityViewTest.php +++ b/repo/tests/phpunit/includes/EntityViewTest.php @@ -312,17 +312,17 @@ $entity = Item::newEmpty(); $entity->setLabel( 'de', 'foo' ); - $entity->setId( 49 ); + $entity->setId( 27449 ); $content = $entityContentFactory->newFromEntity( $entity ); - $q98 = new ItemId( 'Q98' ); + $q98 = new ItemId( 'Q27498' ); $entityQ98 = Item::newEmpty(); $entityQ98->setLabel( 'de', 'bar' ); $entityQ98->setId( $q98 ); $itemHandler = new ItemHandler(); - $itemTitle = Title::makeTitle( $itemHandler->getEntityNamespace(), 'Q98' ); + $itemTitle = Title::makeTitle( $itemHandler->getEntityNamespace(), 'Q27498' ); $titleText = $itemTitle->getPrefixedText(); $entityLoader = new MockRepository(); @@ -339,9 +339,9 @@ $argLists[] = array( $content, $entityLoader, null, $languageFallbackChain, 'fr', true, array( 'wbEntityType' => 'item', 'wbDataLangName' => 'français', - 'wbEntityId' => 'Q49', - 'wbEntity' => '{"id":"Q49","type":"item","labels":{"de":{"language":"de","value":"foo"},"fr":{"language":"de","value":"foo"}},"claims":{"P11":[{"id":null,"mainsnak":{"snaktype":"value","property":"P11","datavalue":{"value":{"entity-type":"item","numeric-id":98},"type":"wikibase-entityid"}},"type":"claim"}]}}', - 'wbUsedEntities' => '{"Q98":{"content":{"id":"Q98","type":"item","labels":{"fr":{"language":"de","value":"bar"}}},"title":"' . $titleText . '","revision":""}}', + 'wbEntityId' => 'Q27449', + 'wbEntity' => '{"id":"Q27449","type":"item","labels":{"de":{"language":"de","value":"foo"},"fr":{"language":"de","value":"foo"}},"claims":{"P11":[{"id":null,"mainsnak":{"snaktype":"value","property":"P11","datavalue":{"value":{"entity-type":"item","numeric-id":27498},"type":"wikibase-entityid"}},"type":"claim"}]}}', + 'wbUsedEntities' => '{"Q27498":{"content":{"id":"Q27498","type":"item","labels":{"fr":{"language":"de","value":"bar"}}},"title":"' . $titleText . '","revision":""}}', ) ); $languageFallbackChain = $languageFallbackChainFactory->newFromLanguageCode( @@ -351,9 +351,9 @@ $argLists[] = array( $content, $entityLoader, null, $languageFallbackChain, 'nl', true, array( 'wbEntityType' => 'item', 'wbDataLangName' => 'Nederlands', - 'wbEntityId' => 'Q49', - 'wbEntity' => '{"id":"Q49","type":"item","labels":{"de":{"language":"de","value":"foo"}},"claims":{"P11":[{"id":null,"mainsnak":{"snaktype":"value","property":"P11","datavalue":{"value":{"entity-type":"item","numeric-id":98},"type":"wikibase-entityid"}},"type":"claim"}]}}', - 'wbUsedEntities' => '{"Q98":{"content":{"id":"Q98","type":"item"},"title":"' . $titleText . '","revision":""}}', + 'wbEntityId' => 'Q27449', + 'wbEntity' => '{"id":"Q27449","type":"item","labels":{"de":{"language":"de","value":"foo"}},"claims":{"P11":[{"id":null,"mainsnak":{"snaktype":"value","property":"P11","datavalue":{"value":{"entity-type":"item","numeric-id":27498},"type":"wikibase-entityid"}},"type":"claim"}]}}', + 'wbUsedEntities' => '{"Q27498":{"content":{"id":"Q27498","type":"item"},"title":"' . $titleText . '","revision":""}}', ) ); // TODO: add more tests for other JS vars -- To view, visit https://gerrit.wikimedia.org/r/86844 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id264fa056805ff32bb8aa7aa3fc54974a0809e92 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Daniel Kinzler <daniel.kinz...@wikimedia.de> Gerrit-Reviewer: Aude <aude.w...@gmail.com> Gerrit-Reviewer: Jeroen De Dauw <jeroended...@gmail.com> Gerrit-Reviewer: Tobias Gritschacher <tobias.gritschac...@wikimedia.de> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits