X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpreprocessorFuzzTest.php;h=bdc955bb86c6c483c2a26abb074cec7df7aae7ad;hb=e900893531e76fb8f80c1c9b5be459fd02862c3c;hp=68fb6435a541c973f700e2c25e8290f6a3e2465f;hpb=509b2f7fe247bfe89c6bedd21d4bfd22d435aa4d;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/preprocessorFuzzTest.php b/maintenance/preprocessorFuzzTest.php index 68fb6435a5..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,16 @@ 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 + */ function __construct( $tester ) { global $wgMaxSigChars; $this->parent = $tester; @@ -206,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