Denny Vrandecic has submitted this change and it was merged. Change subject: Added testErrorOnUnknownDiffOpType to MapPatcherTest ......................................................................
Added testErrorOnUnknownDiffOpType to MapPatcherTest Change-Id: I7b764195a7d752325afd5f5a8c92668cd849fc29 --- M tests/phpunit/patcher/MapPatcherTest.php 1 file changed, 19 insertions(+), 0 deletions(-) Approvals: Denny Vrandecic: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/patcher/MapPatcherTest.php b/tests/phpunit/patcher/MapPatcherTest.php index adf38a6..e389c82 100644 --- a/tests/phpunit/patcher/MapPatcherTest.php +++ b/tests/phpunit/patcher/MapPatcherTest.php @@ -360,4 +360,23 @@ $this->assertEquals( $expectedMap, $patchedMap ); } + public function testErrorOnUnknownDiffOpType() { + $patcher = new MapPatcher(); + + $diffOp = $this->getMock( 'Diff\DiffOp' ); + + $diffOp->expects( $this->any() ) + ->method( 'getType' ) + ->will( $this->returnValue( 'diff' ) ); + + $diff = new Diff( array( $diffOp ), true ); + + $patcher->patch( array(), $diff ); + + $patcher->throwErrors(); + $this->setExpectedException( 'Diff\PatcherException' ); + + $patcher->patch( array(), $diff ); + } + } -- To view, visit https://gerrit.wikimedia.org/r/65699 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7b764195a7d752325afd5f5a8c92668cd849fc29 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