Jeroen De Dauw has submitted this change and it was merged. Change subject: Be evil and use MediaWikiTestCase::assertTag for phpunit 4.3 compat ......................................................................
Be evil and use MediaWikiTestCase::assertTag for phpunit 4.3 compat Change-Id: I337e6bd480415eb4ca08b6c0eb5ef9027f774b10 --- M client/tests/phpunit/includes/hooks/BaseTemplateAfterPortalHandlerTest.php M repo/tests/phpunit/includes/ItemDisambiguationTest.php M repo/tests/phpunit/includes/View/SiteLinksViewTest.php 3 files changed, 6 insertions(+), 3 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved diff --git a/client/tests/phpunit/includes/hooks/BaseTemplateAfterPortalHandlerTest.php b/client/tests/phpunit/includes/hooks/BaseTemplateAfterPortalHandlerTest.php index 4564cf1..f535857 100644 --- a/client/tests/phpunit/includes/hooks/BaseTemplateAfterPortalHandlerTest.php +++ b/client/tests/phpunit/includes/hooks/BaseTemplateAfterPortalHandlerTest.php @@ -2,6 +2,7 @@ namespace Wikibase\Test; +use MediaWikiTestCase; use Wikibase\Client\Hooks\BaseTemplateAfterPortletHandler; /** @@ -35,7 +36,7 @@ if ( $expected === null ) { $this->assertNull( $formattedLink ); } else { - $this->assertTag( $expected, $formattedLink ); + MediaWikiTestCase::assertTag( $expected, $formattedLink ); } } diff --git a/repo/tests/phpunit/includes/ItemDisambiguationTest.php b/repo/tests/phpunit/includes/ItemDisambiguationTest.php index b482994..3cfb8d8 100644 --- a/repo/tests/phpunit/includes/ItemDisambiguationTest.php +++ b/repo/tests/phpunit/includes/ItemDisambiguationTest.php @@ -7,6 +7,7 @@ use Wikibase\DataModel\Entity\ItemId; use Wikibase\ItemDisambiguation; use Wikibase\Lib\EntityIdFormatter; +use MediaWikiTestCase; /** * @covers Wikibase\ItemDisambiguation @@ -120,7 +121,7 @@ $html = $disambig->getHTML( $items ); foreach ( $matchers as $key => $matcher ) { - $this->assertTag( $matcher, $html, "Failed to match HTML output with tag '{$key}'" ); + MediaWikiTestCase::assertTag( $matcher, $html, "Failed to match HTML output with tag '{$key}'" ); } } diff --git a/repo/tests/phpunit/includes/View/SiteLinksViewTest.php b/repo/tests/phpunit/includes/View/SiteLinksViewTest.php index 7b358a7..45c498f 100644 --- a/repo/tests/phpunit/includes/View/SiteLinksViewTest.php +++ b/repo/tests/phpunit/includes/View/SiteLinksViewTest.php @@ -3,6 +3,7 @@ namespace Wikibase\Test; use MediaWikiSite; +use MediaWikiTestCase; use SiteList; use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\Item; @@ -59,7 +60,7 @@ $value = $siteLinksView->getHtml( $item->getSiteLinks(), $item->getId(), $groups, $editable ); $this->assertInternalType( 'string', $value ); - $this->assertTag( $expectedValue, $value, $value . ' did not match ' . var_export( $expectedValue, true ) ); + MediaWikiTestCase::assertTag( $expectedValue, $value, $value . ' did not match ' . var_export( $expectedValue, true ) ); } public function getHtmlProvider() { -- To view, visit https://gerrit.wikimedia.org/r/167245 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I337e6bd480415eb4ca08b6c0eb5ef9027f774b10 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Hoo man <h...@online.de> Gerrit-Reviewer: Jeroen De Dauw <jeroended...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits