dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Deprecate Parser implementation methods (will be private in next release)
[lhc/web/wiklou.git]
/
maintenance
/
preprocessorFuzzTest.php
diff --git
a/maintenance/preprocessorFuzzTest.php
b/maintenance/preprocessorFuzzTest.php
index
68fb643
..
bdc955b
100644
(file)
--- a/
maintenance/preprocessorFuzzTest.php
+++ b/
maintenance/preprocessorFuzzTest.php
@@
-23,6
+23,8
@@
use MediaWiki\MediaWikiServices;
use MediaWiki\MediaWikiServices;
+use Wikimedia\TestingAccessWrapper;
+
$optionsWithoutArgs = [ 'verbose' ];
require_once __DIR__ . '/commandLine.inc';
$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 $maxLength = 20;
public $maxTemplates = 5;
// public $outputTypes = [ 'OT_HTML', 'OT_WIKI', 'OT_PREPROCESS' ];
- public $entryPoints = [ '
testSrvus', 'testPst', 't
estPreprocess' ];
+ public $entryPoints = [ '
fuzzTestSrvus', 'fuzzTestPst', 'fuzzT
estPreprocess' ];
public $verbose = false;
/**
public $verbose = false;
/**
@@
-150,6
+152,16
@@
class PPFuzzTester {
class PPFuzzTest {
public $templates, $mainText, $title, $entryPoint, $output;
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;
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(
$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
$this->mainText,
$this->title,
$options