Add $wgDiffEngine
[lhc/web/wiklou.git] / tests / phpunit / includes / api / ApiComparePagesTest.php
index 9e18eb0..26c3f8f 100644 (file)
@@ -10,16 +10,6 @@ class ApiComparePagesTest extends ApiTestCase {
 
        protected static $repl = [];
 
-       protected function setUp() {
-               parent::setUp();
-
-               // Set $wgExternalDiffEngine to something bogus to try to force use of
-               // the PHP engine rather than wikidiff2.
-               $this->setMwGlobals( [
-                       'wgExternalDiffEngine' => '/dev/null',
-               ] );
-       }
-
        protected function addPage( $page, $text, $model = CONTENT_MODEL_WIKITEXT ) {
                $title = Title::newFromText( 'ApiComparePagesTest ' . $page );
                $content = ContentHandler::makeContent( $text, $title, $model );
@@ -131,6 +121,8 @@ class ApiComparePagesTest extends ApiTestCase {
         * @dataProvider provideDiff
         */
        public function testDiff( $params, $expect, $exceptionCode = false, $sysop = false ) {
+               $this->setMwGlobals( [ 'wgDiffEngine' => 'php' ] );
+
                $this->doReplacements( $params );
 
                $params += [