MathConfig::NEW, 'MathValidModes' => [ MathConfig::MODE_SOURCE ], 'MathEntitySelectorFallbackUrl' => self::DUMMY_URL, ] ); $services = new MediaWikiServices( $config ); $services->defineService( 'Math.Config', function ( MediaWikiServices $services ) use ( $config ) { return new MathConfig( new ServiceOptions( MathConfig::CONSTRUCTOR_OPTIONS, $config ), $this->createMock( ExtensionRegistry::class ) ); } ); $mathConfig = Math::getMathConfig( $services ); $this->assertStringContainsString( 'new', $mathConfig->texCheckDisabled() ); } }