summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2016-06-06 10:28:10 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2016-06-09 13:59:58 +0200
commit0041d89dc2c589d9904226c61b60cf246b92b771 (patch)
treee3ea5138b8d2885d8871325c75dba417e0279cc4 /tests
parent16559e4a8abfef2623b2e6f0d6e1199eac3154c3 (diff)
downloadnextcloud-server-0041d89dc2c589d9904226c61b60cf246b92b771.tar.gz
nextcloud-server-0041d89dc2c589d9904226c61b60cf246b92b771.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
*/