Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-05-29 04:45:06 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-05-29 04:45:06 +0400
commit82da315ea28b6ac1b94f3bc683bc0c8f29756fce (patch)
tree7830306d3c2c52ef8ce89af922e3d78090784fd6 /tests
parent62acfde14e6c514b6a5008c9f6aaa284b01db44b (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.php11
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();