diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2025-06-20 15:52:56 +0200 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2025-06-25 19:46:53 +0200 |
commit | ba11c713c05b66fc9466844b305c33bec67e33c9 (patch) | |
tree | a52f41f650a891ab4c73e806266d1562c4a6cfb5 /tests/lib/Config/LexiconTest.php | |
parent | 0f94ceace12e96f2ffffba029cdb3d69dea46e14 (diff) | |
download | nextcloud-server-feat/noid/lexicon-events.tar.gz nextcloud-server-feat/noid/lexicon-events.zip |
feat(lexicon): events onSet() and initialize()feat/noid/lexicon-events
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'tests/lib/Config/LexiconTest.php')
-rw-r--r-- | tests/lib/Config/LexiconTest.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/lib/Config/LexiconTest.php b/tests/lib/Config/LexiconTest.php index 530767a7416..068984a56f3 100644 --- a/tests/lib/Config/LexiconTest.php +++ b/tests/lib/Config/LexiconTest.php @@ -203,4 +203,33 @@ class LexiconTest extends TestCase { $this->configManager->migrateConfigLexiconKeys(TestConfigLexicon_I::APPID); $this->assertSame(false, $this->appConfig->getValueBool(TestConfigLexicon_I::APPID, 'key4')); } + + public function testAppConfigOnSetEdit() { + $this->appConfig->setValueInt(TestConfigLexicon_I::APPID, 'key5', 42); + $this->assertSame(52, $this->appConfig->getValueInt(TestConfigLexicon_I::APPID, 'key5')); + } + + public function testAppConfigOnSetIgnore() { + $this->appConfig->setValueInt(TestConfigLexicon_I::APPID, 'key5', 142); + $this->assertSame(12, $this->appConfig->getValueInt(TestConfigLexicon_I::APPID, 'key5')); + } + + public function testUserConfigOnSetEdit() { + $this->userConfig->setValueInt('user1', TestConfigLexicon_I::APPID, 'key5', 42); + $this->assertSame(32, $this->userConfig->getValueInt('user1', TestConfigLexicon_I::APPID, 'key5')); + } + + public function testUserConfigOnSetIgnore() { + $this->userConfig->setValueInt('user1', TestConfigLexicon_I::APPID, 'key5', 142); + $this->assertSame(12, $this->userConfig->getValueInt('user1', TestConfigLexicon_I::APPID, 'key5')); + } + + public function testAppConfigInitialize() { + $this->assertSame('random_string', $this->appConfig->getValueString(TestConfigLexicon_I::APPID, 'key6')); + } + + public function testUserConfigInitialize() { + $this->assertSame('random_string', $this->userConfig->getValueString('user1', TestConfigLexicon_I::APPID, 'key6')); + } + } |