getServiceContainer()->getWikiPageFactory()->newFromTitle( $title ); $this->editPage( $page, $oldText, 'Creating the test page' ); $this->editPage( $page, $newText, $summary ); $baseVars = VariableHolder::newFromArray( [ 'old_wikitext' => $oldText, 'new_wikitext' => $newText, 'summary' => $summary ] ); $generator = AbuseFilterServices::getVariableGeneratorFactory()->newGenerator( $baseVars ); $actualHolder = $generator->addEditVars( $page, $this->getTestUser()->getUser() ) ->getVariableHolder(); $actual = AbuseFilterServices::getVariablesManager()->exportAllVars( $actualHolder ); // Special case for new_html: avoid flaky tests, and only check containment $this->assertStringContainsString( '
assertNotRegExp( "/