diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-05-29 04:45:06 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-05-29 04:45:06 +0400 |
commit | 82da315ea28b6ac1b94f3bc683bc0c8f29756fce (patch) | |
tree | 7830306d3c2c52ef8ce89af922e3d78090784fd6 /tests | |
parent | 62acfde14e6c514b6a5008c9f6aaa284b01db44b (diff) |
refs #5212 added possibility to make a system setting readable for non super users
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PHPUnit/Integration/Core/Plugin/SettingsTest.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/PHPUnit/Integration/Core/Plugin/SettingsTest.php b/tests/PHPUnit/Integration/Core/Plugin/SettingsTest.php index 4f2df24dbb..a248b2b54f 100644 --- a/tests/PHPUnit/Integration/Core/Plugin/SettingsTest.php +++ b/tests/PHPUnit/Integration/Core/Plugin/SettingsTest.php @@ -323,7 +323,7 @@ class Core_Plugin_SettingsTest extends DatabaseTestCase /** * @expectedException \Exception - * @expectedExceptionMessage CoreAdminHome_PluginSettingChangeNotAllowed + * @expectedExceptionMessage CoreAdminHome_PluginSettingReadNotAllowed */ public function test_getSettingValue_shouldThrowException_IfUserHasNotEnoughPermissionToReadValue() { @@ -332,6 +332,15 @@ class Core_Plugin_SettingsTest extends DatabaseTestCase $this->settings->getSettingValue($setting); } + public function test_getSettingValue_shouldReturnValue_IfReadbleByCurrentUserIsAllowed() + { + $this->setUser(); + $setting = $this->addSystemSetting('myusersetting', 'mytitle'); + $setting->readableByCurrentUser = true; + + $this->assertEquals('', $this->settings->getSettingValue($setting)); + } + public function test_getSettingValue_shouldReturnValue_IfValueExistsAndUserHasPermission() { $this->setUser(); |