Denny Vrandecic has submitted this change and it was merged. Change subject: Add unhappy path test to MapDifferTest ......................................................................
Add unhappy path test to MapDifferTest Change-Id: Iba9b99b71852a4758a8fce7756cb0c2ef5da50c7 --- M tests/phpunit/differ/MapDifferTest.php 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Denny Vrandecic: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/differ/MapDifferTest.php b/tests/phpunit/differ/MapDifferTest.php index 27a4d03..faf40ef 100644 --- a/tests/phpunit/differ/MapDifferTest.php +++ b/tests/phpunit/differ/MapDifferTest.php @@ -198,4 +198,16 @@ ); } + public function testCallbackComparisonReturningNyanCat() { + $differ = new MapDiffer(); + + $differ->setComparisonCallback( function( $foo, $bar ) { + return '~=[,,_,,]:3'; + } ); + + $this->setExpectedException( 'Exception' ); + + $differ->doDiff( array( 1, '2', 'baz' ), array( 1, 'foo', '2' ) ); + } + } -- To view, visit https://gerrit.wikimedia.org/r/64805 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iba9b99b71852a4758a8fce7756cb0c2ef5da50c7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Diff Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw <jeroended...@gmail.com> Gerrit-Reviewer: Denny Vrandecic <denny.vrande...@wikimedia.de> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits