X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fparser%2FParserOptionsTest.php;h=d55372c61f70490ee405928f2c1010451f430adb;hb=8b0e7298ac25ccbb83d382bcb81f6c9433d053ca;hp=93ab35c424917f09fc56016d3e9184bb451c5133;hpb=8a95833baed3b8071fcbd8cd2bc8c3449409f665;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/parser/ParserOptionsTest.php b/tests/phpunit/includes/parser/ParserOptionsTest.php index 93ab35c424..d55372c61f 100644 --- a/tests/phpunit/includes/parser/ParserOptionsTest.php +++ b/tests/phpunit/includes/parser/ParserOptionsTest.php @@ -21,7 +21,6 @@ class ParserOptionsTest extends MediaWikiTestCase { 'stubthreshold' => true, 'printable' => true, 'userlang' => true, - 'wrapclass' => true, ]; } @@ -62,11 +61,14 @@ class ParserOptionsTest extends MediaWikiTestCase { 'No overrides' => [ true, [] ], 'In-key options are ok' => [ true, [ 'thumbsize' => 1e100, - 'wrapclass' => false, + 'printable' => false, ] ], 'Non-in-key options are not ok' => [ false, [ 'removeComments' => false, ] ], + 'Non-in-key options are not ok (2)' => [ false, [ + 'wrapclass' => 'foobar', + ] ], 'Canonical override, not default (1)' => [ true, [ 'tidy' => true, ] ], @@ -102,7 +104,7 @@ class ParserOptionsTest extends MediaWikiTestCase { } public static function provideOptionsHash() { - $used = [ 'wrapclass', 'printable' ]; + $used = [ 'thumbsize', 'printable' ]; $classWrapper = TestingAccessWrapper::newFromClass( ParserOptions::class ); $classWrapper->getDefaults(); @@ -116,9 +118,9 @@ class ParserOptionsTest extends MediaWikiTestCase { 'Canonical options, used some options' => [ $used, 'canonical', [] ], 'Used some options, non-default values' => [ $used, - 'printable=1!wrapclass=foobar', + 'printable=1!thumbsize=200', [ - 'wrapclass' => 'foobar', + 'thumbsize' => 200, 'printable' => true, ] ], @@ -213,7 +215,7 @@ class ParserOptionsTest extends MediaWikiTestCase { $wgHooks['ParserOptionsRegister'] = []; $this->assertSame( [ 'dateformat', 'numberheadings', 'printable', 'stubthreshold', - 'thumbsize', 'userlang', 'wrapclass', + 'thumbsize', 'userlang' ], ParserOptions::allCacheVaryingOptions() ); self::clearCache(); @@ -231,7 +233,7 @@ class ParserOptionsTest extends MediaWikiTestCase { }; $this->assertSame( [ 'dateformat', 'foo', 'numberheadings', 'printable', 'stubthreshold', - 'thumbsize', 'userlang', 'wrapclass', + 'thumbsize', 'userlang' ], ParserOptions::allCacheVaryingOptions() ); }