if ( isset( $opts['pst'] ) ) {
$out = $parser->preSaveTransform( $test['input'], $title, $user, $options );
+ $output = $parser->getOutput();
} elseif ( isset( $opts['msg'] ) ) {
$out = $parser->transformMsg( $test['input'], $options, $title );
} elseif ( isset( $opts['section'] ) ) {
}
}
+ if ( isset( $output ) && isset( $opts['showflags'] ) ) {
+ $actualFlags = array_keys( TestingAccessWrapper::newFromObject( $output )->mFlags );
+ sort( $actualFlags );
+ $out .= "\nflags=" . join( ', ', $actualFlags );
+ }
+
ScopedCallback::consume( $teardownGuard );
$expected = $test['result'];
Magic Word: {{REVISIONID}}
!! options
parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+showflags
!! wikitext
{{REVISIONID}}
!! html/*
<p>1337
</p>
+flags=vary-revision-id
!! end
!! test
!! end
+!! test
+ParserOutput flags from signature expansion (T84843)
+!! options
+pst
+showflags
+!! wikitext
+~~~~
+!! html/php
+[[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
+flags=user-signature
+!! end
+
+
!! test
pre-save transform: Signature expansion in nowiki tags (T2093)
!! options