jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/345945 )
Change subject: phpunit: Remove unused assertNotTag() and assertTag() overrides ...................................................................... phpunit: Remove unused assertNotTag() and assertTag() overrides Deprecated since PHPUnit 4.2, we use PHPUnit 4.8 and would like to be compatible with PHPUnit 5 which no longer has this method. The current hack was only enough to avoid the deprecation warning, the underlying logic in Xml::findNodes() was also removed in PHPUnit 5. Follows-up 23ec64745c, dba0522f70, T71505. * assertNotTag() is not used anywhere in Wikimedia Git. * assertTag() was used in 1 test in core, fixed in the parent commit. Match in mediawiki/skins/chameleon is unrelated. Change-Id: I56b8f1f88124d69190938fc522ea75419e96c49c --- M tests/phpunit/MediaWikiTestCase.php 1 file changed, 0 insertions(+), 45 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/MediaWikiTestCase.php b/tests/phpunit/MediaWikiTestCase.php index 419ff00..bb7267a 100644 --- a/tests/phpunit/MediaWikiTestCase.php +++ b/tests/phpunit/MediaWikiTestCase.php @@ -1769,51 +1769,6 @@ } /** - * @param array $matcher - * @param string $actual - * @param bool $isHtml - * - * @return bool - */ - private static function tagMatch( $matcher, $actual, $isHtml = true ) { - $dom = PHPUnit_Util_XML::load( $actual, $isHtml ); - $tags = PHPUnit_Util_XML::findNodes( $dom, $matcher, $isHtml ); - return count( $tags ) > 0 && $tags[0] instanceof DOMNode; - } - - /** - * Note: we are overriding this method to remove the deprecated error - * @see https://phabricator.wikimedia.org/T71505 - * @see https://github.com/sebastianbergmann/phpunit/issues/1292 - * @deprecated - * - * @param array $matcher - * @param string $actual - * @param string $message - * @param bool $isHtml - */ - public static function assertTag( $matcher, $actual, $message = '', $isHtml = true ) { - // trigger_error(__METHOD__ . ' is deprecated', E_USER_DEPRECATED); - - self::assertTrue( self::tagMatch( $matcher, $actual, $isHtml ), $message ); - } - - /** - * @see MediaWikiTestCase::assertTag - * @deprecated - * - * @param array $matcher - * @param string $actual - * @param string $message - * @param bool $isHtml - */ - public static function assertNotTag( $matcher, $actual, $message = '', $isHtml = true ) { - // trigger_error(__METHOD__ . ' is deprecated', E_USER_DEPRECATED); - - self::assertFalse( self::tagMatch( $matcher, $actual, $isHtml ), $message ); - } - - /** * Used as a marker to prevent wfResetOutputBuffers from breaking PHPUnit. * @return string */ -- To view, visit https://gerrit.wikimedia.org/r/345945 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I56b8f1f88124d69190938fc522ea75419e96c49c Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle <krinklem...@gmail.com> Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org> Gerrit-Reviewer: Reedy <re...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits