aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Config/LexiconTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Config/LexiconTest.php')
-rw-r--r--tests/lib/Config/LexiconTest.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/lib/Config/LexiconTest.php b/tests/lib/Config/LexiconTest.php
index def9e152853..d7e9b12a1cf 100644
--- a/tests/lib/Config/LexiconTest.php
+++ b/tests/lib/Config/LexiconTest.php
@@ -10,6 +10,7 @@ namespace Tests\lib\Config;
use OC\AppConfig;
use OC\AppFramework\Bootstrap\Coordinator;
use OC\Config\ConfigManager;
+use OC\Config\PresetManager;
use OCP\Config\Exceptions\TypeConflictException;
use OCP\Config\Exceptions\UnknownKeyException;
use OCP\Config\IUserConfig;
@@ -32,6 +33,7 @@ class LexiconTest extends TestCase {
private IAppConfig $appConfig;
private IUserConfig $userConfig;
private ConfigManager $configManager;
+ private PresetManager $presetManager;
protected function setUp(): void {
parent::setUp();
@@ -45,6 +47,7 @@ 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);
}
protected function tearDown(): void {
@@ -206,26 +209,26 @@ class LexiconTest extends TestCase {
}
public function testAppConfigLexiconPreset() {
- $this->configManager->setLexiconPreset(Preset::FAMILY);
+ $this->presetManager->setLexiconPreset(Preset::FAMILY);
$this->assertSame('family', $this->appConfig->getValueString(TestLexicon_E::APPID, 'key3'));
}
public function testAppConfigLexiconPresets() {
- $this->configManager->setLexiconPreset(Preset::MEDIUM);
+ $this->presetManager->setLexiconPreset(Preset::MEDIUM);
$this->assertSame('club+medium', $this->appConfig->getValueString(TestLexicon_E::APPID, 'key3'));
- $this->configManager->setLexiconPreset(Preset::FAMILY);
+ $this->presetManager->setLexiconPreset(Preset::FAMILY);
$this->assertSame('family', $this->appConfig->getValueString(TestLexicon_E::APPID, 'key3'));
}
public function testUserConfigLexiconPreset() {
- $this->configManager->setLexiconPreset(Preset::FAMILY);
+ $this->presetManager->setLexiconPreset(Preset::FAMILY);
$this->assertSame('family', $this->userConfig->getValueString('user1', TestLexicon_E::APPID, 'key3'));
}
public function testUserConfigLexiconPresets() {
- $this->configManager->setLexiconPreset(Preset::MEDIUM);
+ $this->presetManager->setLexiconPreset(Preset::MEDIUM);
$this->assertSame('club+medium', $this->userConfig->getValueString('user1', TestLexicon_E::APPID, 'key3'));
- $this->configManager->setLexiconPreset(Preset::FAMILY);
+ $this->presetManager->setLexiconPreset(Preset::FAMILY);
$this->assertSame('family', $this->userConfig->getValueString('user1', TestLexicon_E::APPID, 'key3'));
}
}