X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpreprocessorFuzzTest.php;h=bdc955bb86c6c483c2a26abb074cec7df7aae7ad;hb=e900893531e76fb8f80c1c9b5be459fd02862c3c;hp=39b2ff03e86e042cc706c27ece47d1c365a46aea;hpb=b3e4a6f61f314b0933832bc944551866da31773e;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/preprocessorFuzzTest.php b/maintenance/preprocessorFuzzTest.php index 39b2ff03e8..bdc955bb86 100644 --- a/maintenance/preprocessorFuzzTest.php +++ b/maintenance/preprocessorFuzzTest.php @@ -23,6 +23,8 @@ use MediaWiki\MediaWikiServices; +use Wikimedia\TestingAccessWrapper; + $optionsWithoutArgs = [ 'verbose' ]; require_once __DIR__ . '/commandLine.inc'; @@ -46,7 +48,7 @@ class PPFuzzTester { public $maxLength = 20; public $maxTemplates = 5; // public $outputTypes = [ 'OT_HTML', 'OT_WIKI', 'OT_PREPROCESS' ]; - public $entryPoints = [ 'testSrvus', 'testPst', 'testPreprocess' ]; + public $entryPoints = [ 'fuzzTestSrvus', 'fuzzTestPst', 'fuzzTestPreprocess' ]; public $verbose = false; /** @@ -150,6 +152,13 @@ class PPFuzzTester { class PPFuzzTest { public $templates, $mainText, $title, $entryPoint, $output; + /** @var PPFuzzTester */ + private $parent; + /** @var string */ + public $nickname; + /** @var bool */ + public $fancySig; + /** * @param PPFuzzTester $tester */ @@ -209,7 +218,9 @@ class PPFuzzTest { $options->setTemplateCallback( [ $this, 'templateHook' ] ); $options->setTimestamp( wfTimestampNow() ); $this->output = call_user_func( - [ MediaWikiServices::getInstance()->getParser(), $this->entryPoint ], + [ TestingAccessWrapper::newFromObject( + MediaWikiServices::getInstance()->getParser() + ), $this->entryPoint ], $this->mainText, $this->title, $options