Followup on 02d13afa: Unbreak Parsoid parser test runs

Change-Id: I226b145eb20440d068f92a0c99d11cbced4cf64d
This commit is contained in:
Subramanya Sastry 2022-08-25 16:59:03 -05:00
parent 246b1f64e5
commit f26545ddbf

View file

@ -46,13 +46,16 @@ class ParsoidTestFileSuite extends TestSuite {
if ( $skipMessage !== null ) {
return;
}
$validTestModes = $this->ptRunner->getRequestedTestModes();
// Dummy mode, for the purpose of satisfying the signature of getTestSkipMessage
// Only used for an isLegacy check, which should always be false for this file
$skipMode = new ParserTestMode( 'not-legacy' );
$modeRestriction = $this->ptFileInfo->fileOptions['parsoid-compatible'] ?? false;
if ( $modeRestriction !== false ) {
// This is expected to be set at this point. $skipMessage above will have
// skipped the file if not.
$modeRestriction = $this->ptFileInfo->fileOptions['parsoid-compatible'];
// Treat 'parsoid-compatible' as enabling all modes.
if ( $modeRestriction !== '' ) {
if ( is_string( $modeRestriction ) ) {
// shorthand
$modeRestriction = [ $modeRestriction ];