From: daniel Date: Tue, 29 May 2012 10:43:53 +0000 (+0200) Subject: skip test for WikitextContentHandler::merge3 if $wgDiff3 isn't configured X-Git-Tag: 1.31.0-rc.0~22097^2^2~152 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=604ef15dce06d50532f76356301c41f04e6ef01c;p=lhc%2Fweb%2Fwiklou.git skip test for WikitextContentHandler::merge3 if $wgDiff3 isn't configured --- diff --git a/tests/phpunit/includes/WikitextContentHandlerTest.php b/tests/phpunit/includes/WikitextContentHandlerTest.php index a493aacb0f..a7615cfb48 100644 --- a/tests/phpunit/includes/WikitextContentHandlerTest.php +++ b/tests/phpunit/includes/WikitextContentHandlerTest.php @@ -104,6 +104,18 @@ class WikitextContentHandlerTest extends MediaWikiTestCase { * @dataProvider dataMerge3 */ public function testMerge3( $old, $mine, $yours, $expected ) { + global $wgDiff3; + + if ( !$wgDiff3 ) { + $this->markTestSkipped( "Can't test merge3(), since \$wgDiff3 is not configured" ); + } + + if ( !file_exists( $wgDiff3 ) ) { + #XXX: this sucks, since it uses arcane internal knowledge about TextContentHandler::merge3 and wfMerge. + $this->markTestSkipped( "Can't test merge3(), since \$wgDiff3 is misconfigured: can't find $wgDiff3" ); + } + + // test merge $oldContent = new WikitextContent( $old ); $myContent = new WikitextContent( $mine ); $yourContent = new WikitextContent( $yours );