diff options
Diffstat (limited to 'tests/lib/AllConfigTest.php')
-rw-r--r-- | tests/lib/AllConfigTest.php | 19 |
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 */ |