From 604ef15dce06d50532f76356301c41f04e6ef01c Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 29 May 2012 12:43:53 +0200 Subject: [PATCH] skip test for WikitextContentHandler::merge3 if $wgDiff3 isn't configured --- .../phpunit/includes/WikitextContentHandlerTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 ); -- 2.20.1