appConfig = $this->createMock(IAppConfig::class); $this->config = new CalendarFederationConfig( $this->appConfig, ); } public static function provideIsFederationEnabledData(): array { return [ [true], [false], ]; } #[DataProvider(methodName: 'provideIsFederationEnabledData')] public function testIsFederationEnabled(bool $configValue): void { $this->appConfig->expects(self::once()) ->method('getAppValueBool') ->with('enableCalendarFederation', true) ->willReturn($configValue); $this->assertEquals($configValue, $this->config->isFederationEnabled()); } }