getServiceContainer()->getWikiPageFactory()->newFromTitle( $title ); $this->editPage( $pageName, $oldText, 'Creating the test page' ); $this->editPage( $pageName, $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( '