use MediaWiki\Block\DatabaseBlock;
use MediaWiki\Block\CompositeBlock;
use MediaWiki\Block\SystemBlock;
-use MediaWiki\Config\ServiceOptions;
use MediaWiki\MediaWikiServices;
use Wikimedia\TestingAccessWrapper;
* @coversDefaultClass \MediaWiki\Block\BlockManager
*/
class BlockManagerTest extends MediaWikiTestCase {
+ use TestAllServiceOptionsUsed;
/** @var User */
protected $user;
private function getBlockManagerConstructorArgs( $overrideConfig ) {
$blockManagerConfig = array_merge( $this->blockManagerConfig, $overrideConfig );
$this->setMwGlobals( $blockManagerConfig );
- $this->overrideMwServices();
return [
- new ServiceOptions(
+ new LoggedServiceOptions(
+ self::$serviceOptionsAccessLog,
BlockManager::$constructorOptions,
MediaWikiServices::getInstance()->getMainConfig()
),
- $this->user,
- $this->user->getRequest()
+ MediaWikiServices::getInstance()->getPermissionManager()
];
}
];
}
+ /**
+ * @coversNothing
+ */
+ public function testAllServiceOptionsUsed() {
+ $this->assertAllServiceOptionsUsed( [ 'ApplyIpBlocksToXff', 'SoftBlockRanges' ] );
+ }
}