X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fcontent%2FWikitextContentTest.php;h=e04f562429c55f240acd3bbb803908b3512f818a;hp=b9ce997f233d3395ad0e69c94434f1bf5b06a725;hb=2ab7ae9d24009f8cd7555cdbd15c9a852b1cc4db;hpb=10d1b7d12b5d097413cd507740c5c71781c2580b diff --git a/tests/phpunit/includes/content/WikitextContentTest.php b/tests/phpunit/includes/content/WikitextContentTest.php index b9ce997f23..e04f562429 100644 --- a/tests/phpunit/includes/content/WikitextContentTest.php +++ b/tests/phpunit/includes/content/WikitextContentTest.php @@ -40,7 +40,7 @@ more stuff [ "WikitextContentTest_testGetSecondaryDataUpdates_1", CONTENT_MODEL_WIKITEXT, "hello ''world''\n", [ - 'LinksUpdate' => [ + LinksUpdate::class => [ 'mRecursive' => true, 'mLinks' => [] ] @@ -49,7 +49,7 @@ more stuff [ "WikitextContentTest_testGetSecondaryDataUpdates_2", CONTENT_MODEL_WIKITEXT, "hello [[world test 21344]]\n", [ - 'LinksUpdate' => [ + LinksUpdate::class => [ 'mRecursive' => true, 'mLinks' => [ [ 'World_test_21344' => 0 ] @@ -103,16 +103,16 @@ more stuff public static function dataGetSection() { return [ - [ WikitextContentTest::$sections, + [ self::$sections, "0", "Intro" ], - [ WikitextContentTest::$sections, + [ self::$sections, "2", "== test == just a test" ], - [ WikitextContentTest::$sections, + [ self::$sections, "8", false ], @@ -138,38 +138,38 @@ just a test" public static function dataReplaceSection() { return [ - [ WikitextContentTest::$sections, + [ self::$sections, "0", "No more", null, - trim( preg_replace( '/^Intro/sm', 'No more', WikitextContentTest::$sections ) ) + trim( preg_replace( '/^Intro/sm', 'No more', self::$sections ) ) ], - [ WikitextContentTest::$sections, + [ self::$sections, "", "No more", null, "No more" ], - [ WikitextContentTest::$sections, + [ self::$sections, "2", "== TEST ==\nmore fun", null, trim( preg_replace( '/^== test ==.*== foo ==/sm', "== TEST ==\nmore fun\n\n== foo ==", - WikitextContentTest::$sections + self::$sections ) ) ], - [ WikitextContentTest::$sections, + [ self::$sections, "8", "No more", null, - WikitextContentTest::$sections + self::$sections ], - [ WikitextContentTest::$sections, + [ self::$sections, "new", "No more", "New", - trim( WikitextContentTest::$sections ) . "\n\n\n== New ==\n\nNo more" + trim( self::$sections ) . "\n\n\n== New ==\n\nNo more" ], ]; } @@ -446,11 +446,11 @@ just a test" return [ [ "WikitextContentTest_testGetSecondaryDataUpdates_1", CONTENT_MODEL_WIKITEXT, "hello ''world''\n", - [ 'LinksDeletionUpdate' => [] ] + [ LinksDeletionUpdate::class => [] ] ], [ "WikitextContentTest_testGetSecondaryDataUpdates_2", CONTENT_MODEL_WIKITEXT, "hello [[world test 21344]]\n", - [ 'LinksDeletionUpdate' => [] ] + [ LinksDeletionUpdate::class => [] ] ], // @todo more...? ];