summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2016-06-06 10:28:10 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2016-06-06 12:38:20 +0200
commit911fd3ead4e8ef3451aabc4b1f0cd1c7fc106e44 (patch)
tree2b1093f1beee5e871809628774859d997bc67b00 /tests
parentc0a91ddca797c9821d3ce8771664b17ee588535f (diff)
downloadnextcloud-server-911fd3ead4e8ef3451aabc4b1f0cd1c7fc106e44.tar.gz
nextcloud-server-911fd3ead4e8ef3451aabc4b1f0cd1c7fc106e44.zip
Do not allow to store boolean configs, they behave unexpected on postgres
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/AllConfigTest.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/lib/AllConfigTest.php b/tests/lib/AllConfigTest.php
index 4f8b0658b80..3d0a9cb0827 100644
--- a/tests/lib/AllConfigTest.php
+++ b/tests/lib/AllConfigTest.php
@@ -123,6 +123,25 @@ class AllConfigTest extends \Test\TestCase {
$config->deleteUserValue('userPreCond', 'appPreCond', 'keyPreCond');
}
+ public function dataSetUserValueUnexpectedValue() {
+ return [
+ [true],
+ [false],
+ [null],
+ [new \stdClass()],
+ ];
+ }
+
+ /**
+ * @dataProvider dataSetUserValueUnexpectedValue
+ * @param mixed $value
+ * @expectedException \UnexpectedValueException
+ */
+ public function testSetUserValueUnexpectedValue($value) {
+ $config = $this->getConfig();
+ $config->setUserValue('userSetBool', 'appSetBool', 'keySetBool', $value);
+ }
+
/**
* @expectedException \OCP\PreConditionNotMetException
*/