* Add BagOStuffTest subclasses for all core BagOStuff subclasses, replacing PHPUNIT_USE_BAGOSTUFF, as suggested in a todo comment. * Add config $wgEnableRemoteBagOStuffTests which causes all tests enabled by $wgObjectCache to execute, which means that the memcached tests are executed by default. I have verified all except RESTBagOStuff and WinCacheBagOStuff. The memcached tests fail against memcached 1.5.x but pass against memcached 1.6.x. Bug: T90875 Change-Id: Id74b5226669f8cb857f859fbc35bc58ab001e873
22 lines
727 B
PHP
22 lines
727 B
PHP
<?php
|
|
|
|
/**
|
|
* @todo Get rid of this class, the options we don't need (e.g. for filebackend and jobqueue
|
|
* we should have dedicated test subclasses), and use getenv directly in calling code.
|
|
*/
|
|
final class MediaWikiCliOptions {
|
|
/**
|
|
* @fixme This is an awful hack.
|
|
*/
|
|
public static $additionalOptions = [
|
|
'use-filebackend' => null,
|
|
'use-jobqueue' => null,
|
|
'use-normal-tables' => false
|
|
];
|
|
|
|
public static function initialize(): void {
|
|
self::$additionalOptions['use-normal-tables'] = (bool)getenv( 'PHPUNIT_USE_NORMAL_TABLES' );
|
|
self::$additionalOptions['use-filebackend'] = getenv( 'PHPUNIT_USE_FILEBACKEND' ) ?: null;
|
|
self::$additionalOptions['use-jobqueue'] = getenv( 'PHPUNIT_USE_JOBQUEUE' ) ?: null;
|
|
}
|
|
}
|