diff options
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')); + } + } |