*/
use PHPUnit\Framework\TestCase;
+use PHPUnit\Framework\Exception;
/**
* Base class for unit tests.
'wgAutoloadLocalClasses',
// Need for LoggerFactory. Default is NullSpi.
'wgMWLoggerDefaultSpi',
- 'wgAutoloadAttemptLowercase'
+ 'wgAutoloadAttemptLowercase',
+ 'wgLegalTitleChars'
];
}
}
}
+ /**
+ * @inheritDoc
+ */
+ protected function runTest() {
+ try {
+ return parent::runTest();
+ } catch ( ConfigException $exception ) {
+ throw new Exception(
+ 'Config variables must be mocked, they cannot be accessed directly in tests which extend '
+ . self::class,
+ $exception->getCode(),
+ $exception
+ );
+ }
+ }
+
protected function tearDown() {
if ( !defined( 'HHVM_VERSION' ) ) {
// Quick reset between tests