Give TestCase::checkHasDiff3 a better name
authoraddshore <addshorewiki@gmail.com>
Wed, 27 Jan 2016 18:56:09 +0000 (19:56 +0100)
committeraddshore <addshorewiki@gmail.com>
Thu, 28 Jan 2016 11:46:11 +0000 (12:46 +0100)
This method actually marks the test it is called
from as skipped if Diff3 is not confugured.

The new name "markTestSkippedIfNoDiff3" better
reflects that.

Change-Id: I1dffeba0aceb312b3a82216f0b55227e24bc2e34

tests/phpunit/MediaWikiTestCase.php
tests/phpunit/includes/EditPageTest.php
tests/phpunit/includes/GlobalFunctions/GlobalTest.php
tests/phpunit/includes/content/WikitextContentHandlerTest.php
tests/phpunit/includes/page/WikiPageTest.php

index 861e3bd..f69e342 100644 (file)
@@ -1026,7 +1026,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
         *
         * @since 1.21
         */
-       protected function checkHasDiff3() {
+       protected function markTestSkippedIfNoDiff3() {
                global $wgDiff3;
 
                # This check may also protect against code injection in
index 804b6ba..ac745f2 100644 (file)
@@ -463,7 +463,7 @@ hello
        public function testAutoMerge( $baseUser, $text, $adamsEdit, $bertasEdit,
                $expectedCode, $expectedText, $message = null
        ) {
-               $this->checkHasDiff3();
+               $this->markTestSkippedIfNoDiff3();
 
                // create page
                $ns = $this->getDefaultWikitextNS();
index 56f9746..d174947 100644 (file)
@@ -469,7 +469,7 @@ class GlobalTest extends MediaWikiTestCase {
         * @covers ::wfMerge
         */
        public function testMerge( $old, $mine, $yours, $expectedMergeResult, $expectedText ) {
-               $this->checkHasDiff3();
+               $this->markTestSkippedIfNoDiff3();
 
                $mergedText = null;
                $isMerged = wfMerge( $old, $mine, $yours, $mergedText );
index 361238b..6b7a210 100644 (file)
@@ -157,7 +157,7 @@ class WikitextContentHandlerTest extends MediaWikiLangTestCase {
         * @covers WikitextContentHandler::merge3
         */
        public function testMerge3( $old, $mine, $yours, $expected ) {
-               $this->checkHasDiff3();
+               $this->markTestSkippedIfNoDiff3();
 
                // test merge
                $oldContent = new WikitextContent( $old );
index 7c0dd2e..6d2b398 100644 (file)
@@ -816,7 +816,7 @@ more stuff
 
        /* @todo FIXME: fix this!
        public function testGetUndoText() {
-       $this->checkHasDiff3();
+       $this->markTestSkippedIfNoDiff3();
 
        $text = "one";
        $page = $this->createPage( "WikiPageTest_testGetUndoText", $text );