* Follow up to
60e4f3fd
Change-Id: If1370a720da21c3662fda4100c96b1758ddc1dc0
* Resets singleton returned by getMain(). Should be called only from unit tests.
*/
public static function resetMain() {
- if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
+ if ( !( defined( 'MW_PHPUNIT_TEST' ) || defined( 'MW_PARSER_TEST' ) ) ) {
throw new MWException( __METHOD__ . '() should be called only from unit tests!' );
}
self::$instance = null;
* @ingroup Testing
*/
+define( 'MW_PARSER_TEST', true );
+
$options = [ 'quick', 'color', 'quiet', 'help', 'show-output',
'record', 'run-disabled', 'run-parsoid' ];
$optionsWithArgs = [ 'regex', 'filter', 'seed', 'setversion', 'file' ];