summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2013-08-02 15:59:33 +0200
committerkondou <kondou@ts.unde.re>2013-08-02 15:59:33 +0200
commitc74f3d0b90227f95c1b6d21bbb7ee28561b67446 (patch)
tree9ebc58626c72d30d9e2919e52b26c8a37954520e /tests
parent670242c731ac8d832773ac0fe86813061dcf0768 (diff)
downloadnextcloud-server-c74f3d0b90227f95c1b6d21bbb7ee28561b67446.tar.gz
nextcloud-server-c74f3d0b90227f95c1b6d21bbb7ee28561b67446.zip
Add null and emptystring tests to check NOT NULL
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/appconfig.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/lib/appconfig.php b/tests/lib/appconfig.php
index c73e528a277..ae08877bd7f 100644
--- a/tests/lib/appconfig.php
+++ b/tests/lib/appconfig.php
@@ -86,6 +86,20 @@ class Test_Appconfig extends PHPUnit_Framework_TestCase {
$this->assertEquals('somevalue', $value['configvalue']);
}
+ /**
+ * @expectedException \Doctrine\DBAL\DBALException
+ */
+ public function testSetValueNull() {
+ \OC_Appconfig::setValue('testapp', 'installed_version', null);
+ }
+
+ /**
+ * @expectedException \Doctrine\DBAL\DBALException
+ */
+ public function testSetValueEmptyString() {
+ \OC_Appconfig::setValue('testapp', '', '1.33.7');
+ }
+
public function testDeleteKey() {
\OC_Appconfig::deleteKey('testapp', 'deletethis');
$query = \OC_DB::prepare('SELECT `configvalue` FROM `*PREFIX*appconfig` WHERE `appid` = ? AND `configkey` = ?');