diff --git a/tests/lib/AppConfigTest.php b/tests/lib/AppConfigTest.php index f5e385a8405..bc4cc18a44e 100644 --- a/tests/lib/AppConfigTest.php +++ b/tests/lib/AppConfigTest.php @@ -51,7 +51,7 @@ class AppConfigTest extends TestCase { protected function getAppConfig($cached = false): AppConfig { $this->config->method('getSystemValueBool') - ->with('cache_app_config', $cached) + ->with('cache_app_config', true) ->willReturn(true); $this->cacheFactory->method('isLocalCacheAvailable')->willReturn($cached); if ($cached) { diff --git a/tests/lib/Config/LexiconTest.php b/tests/lib/Config/LexiconTest.php index d3809892c0e..89a821528fc 100644 --- a/tests/lib/Config/LexiconTest.php +++ b/tests/lib/Config/LexiconTest.php @@ -10,12 +10,10 @@ namespace Tests\lib\Config; use OC\AppConfig; use OC\AppFramework\Bootstrap\Coordinator; use OC\Config\ConfigManager; -use OC\Config\PresetManager; use OCP\App\IAppManager; use OCP\Config\Exceptions\TypeConflictException; use OCP\Config\Exceptions\UnknownKeyException; use OCP\Config\IUserConfig; -use OCP\Config\Lexicon\Preset; use OCP\Exceptions\AppConfigTypeConflictException; use OCP\Exceptions\AppConfigUnknownKeyException; use OCP\IAppConfig; @@ -34,7 +32,6 @@ class LexiconTest extends TestCase { private IAppConfig $appConfig; private IUserConfig $userConfig; private ConfigManager $configManager; - private PresetManager $presetManager; private IAppManager $appManager; protected function setUp(): void { @@ -49,7 +46,6 @@ class LexiconTest extends TestCase { $this->appConfig = Server::get(IAppConfig::class); $this->userConfig = Server::get(IUserConfig::class); $this->configManager = Server::get(ConfigManager::class); - $this->presetManager = Server::get(PresetManager::class); $this->appManager = Server::get(IAppManager::class); } @@ -215,30 +211,6 @@ class LexiconTest extends TestCase { $this->assertSame(false, $this->appConfig->getValueBool(TestConfigLexicon_I::APPID, 'key4')); } - public function testAppConfigLexiconPreset() { - $this->presetManager->setLexiconPreset(Preset::FAMILY); - $this->assertSame('family', $this->appConfig->getValueString(TestLexicon_E::APPID, 'key3')); - } - - public function testAppConfigLexiconPresets() { - $this->presetManager->setLexiconPreset(Preset::MEDIUM); - $this->assertSame('club+medium', $this->appConfig->getValueString(TestLexicon_E::APPID, 'key3')); - $this->presetManager->setLexiconPreset(Preset::FAMILY); - $this->assertSame('family', $this->appConfig->getValueString(TestLexicon_E::APPID, 'key3')); - } - - public function testUserConfigLexiconPreset() { - $this->presetManager->setLexiconPreset(Preset::FAMILY); - $this->assertSame('family', $this->userConfig->getValueString('user1', TestLexicon_E::APPID, 'key3')); - } - - public function testUserConfigLexiconPresets() { - $this->presetManager->setLexiconPreset(Preset::MEDIUM); - $this->assertSame('club+medium', $this->userConfig->getValueString('user1', TestLexicon_E::APPID, 'key3')); - $this->presetManager->setLexiconPreset(Preset::FAMILY); - $this->assertSame('family', $this->userConfig->getValueString('user1', TestLexicon_E::APPID, 'key3')); - } - public function testLexiconIndexedUpdate() { $this->userConfig->setValueString('user1', TestLexicon_UserIndexed::APPID, 'key1', 'abcd'); $this->userConfig->setValueString('user2', TestLexicon_UserIndexed::APPID, 'key1', '1234', flags: 64);