1010use OC \AppConfig ;
1111use OC \AppFramework \Bootstrap \Coordinator ;
1212use OC \Config \ConfigManager ;
13+ use OC \Config \PresetManager ;
1314use OCP \Config \Exceptions \TypeConflictException ;
1415use OCP \Config \Exceptions \UnknownKeyException ;
1516use OCP \Config \IUserConfig ;
@@ -32,6 +33,7 @@ class LexiconTest extends TestCase {
3233 private IAppConfig $ appConfig ;
3334 private IUserConfig $ userConfig ;
3435 private ConfigManager $ configManager ;
36+ private PresetManager $ presetManager ;
3537
3638 protected function setUp (): void {
3739 parent ::setUp ();
@@ -45,6 +47,7 @@ protected function setUp(): void {
4547 $ this ->appConfig = Server::get (IAppConfig::class);
4648 $ this ->userConfig = Server::get (IUserConfig::class);
4749 $ this ->configManager = Server::get (ConfigManager::class);
50+ $ this ->presetManager = Server::get (PresetManager::class);
4851 }
4952
5053 protected function tearDown (): void {
@@ -206,26 +209,26 @@ public function testAppConfigLexiconRenameInvertBoolean() {
206209 }
207210
208211 public function testAppConfigLexiconPreset () {
209- $ this ->configManager ->setLexiconPreset (Preset::FAMILY );
212+ $ this ->presetManager ->setLexiconPreset (Preset::FAMILY );
210213 $ this ->assertSame ('family ' , $ this ->appConfig ->getValueString (TestLexicon_E::APPID , 'key3 ' ));
211214 }
212215
213216 public function testAppConfigLexiconPresets () {
214- $ this ->configManager ->setLexiconPreset (Preset::MEDIUM );
217+ $ this ->presetManager ->setLexiconPreset (Preset::MEDIUM );
215218 $ this ->assertSame ('club+medium ' , $ this ->appConfig ->getValueString (TestLexicon_E::APPID , 'key3 ' ));
216- $ this ->configManager ->setLexiconPreset (Preset::FAMILY );
219+ $ this ->presetManager ->setLexiconPreset (Preset::FAMILY );
217220 $ this ->assertSame ('family ' , $ this ->appConfig ->getValueString (TestLexicon_E::APPID , 'key3 ' ));
218221 }
219222
220223 public function testUserConfigLexiconPreset () {
221- $ this ->configManager ->setLexiconPreset (Preset::FAMILY );
224+ $ this ->presetManager ->setLexiconPreset (Preset::FAMILY );
222225 $ this ->assertSame ('family ' , $ this ->userConfig ->getValueString ('user1 ' , TestLexicon_E::APPID , 'key3 ' ));
223226 }
224227
225228 public function testUserConfigLexiconPresets () {
226- $ this ->configManager ->setLexiconPreset (Preset::MEDIUM );
229+ $ this ->presetManager ->setLexiconPreset (Preset::MEDIUM );
227230 $ this ->assertSame ('club+medium ' , $ this ->userConfig ->getValueString ('user1 ' , TestLexicon_E::APPID , 'key3 ' ));
228- $ this ->configManager ->setLexiconPreset (Preset::FAMILY );
231+ $ this ->presetManager ->setLexiconPreset (Preset::FAMILY );
229232 $ this ->assertSame ('family ' , $ this ->userConfig ->getValueString ('user1 ' , TestLexicon_E::APPID , 'key3 ' ));
230233 }
231234}
0 commit comments