summaryrefslogtreecommitdiffstats
path: root/tests/core
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-12-09 13:32:52 +0100
committerJoas Schilling <nickvergessen@owncloud.com>2016-01-14 15:02:54 +0100
commit00ab50defc7a683907df59fd503b24a35decf962 (patch)
tree6a0c9373879f0e294716ae0bb3ee49dec5e82ffb /tests/core
parentb9d384d837b0400933d71701f0bcfcd38fe4285b (diff)
downloadnextcloud-server-00ab50defc7a683907df59fd503b24a35decf962.tar.gz
nextcloud-server-00ab50defc7a683907df59fd503b24a35decf962.zip
Retain backwards compatibility
Diffstat (limited to 'tests/core')
-rw-r--r--tests/core/command/config/system/setconfigtest.php40
1 files changed, 15 insertions, 25 deletions
diff --git a/tests/core/command/config/system/setconfigtest.php b/tests/core/command/config/system/setconfigtest.php
index 14a6a980938..c0b664d7522 100644
--- a/tests/core/command/config/system/setconfigtest.php
+++ b/tests/core/command/config/system/setconfigtest.php
@@ -126,31 +126,20 @@ class SetConfigTest extends TestCase {
public function castValueProvider() {
return [
- [null, 'integer', null],
- [null, 'string', null],
-
- ['abc', 'string', 'abc'],
- ['dEF', 'str', 'dEF'],
- ['123', 's', '123'],
-
- ['123', 'integer', 123],
- ['456', 'int', 456],
- ['-666', 'i', -666],
-
- // only use powers of 2 to avoid precision errors
- ['2', 'double', 2.0],
- ['0.25', 'd', 0.25],
- ['0.5', 'float', 0.5],
- ['0.125', 'f', 0.125],
-
- ['true', 'boolean', true],
- ['false', 'bool', false],
- ['yes', 'b', true],
- ['no', 'b', false],
- ['y', 'b', true],
- ['n', 'b', false],
- ['1', 'b', true],
- ['0', 'b', false],
+ [null, 'string', ['value' => '', 'readable-value' => 'empty string']],
+
+ ['abc', 'string', ['value' => 'abc', 'readable-value' => 'string abc']],
+
+ ['123', 'integer', ['value' => 123, 'readable-value' => 'integer 123']],
+ ['456', 'int', ['value' => 456, 'readable-value' => 'integer 456']],
+
+ ['2.25', 'double', ['value' => 2.25, 'readable-value' => 'double 2.25']],
+ ['0.5', 'float', ['value' => 0.5, 'readable-value' => 'double 0.5']],
+
+ ['', 'null', ['value' => null, 'readable-value' => 'null']],
+
+ ['true', 'boolean', ['value' => true, 'readable-value' => 'boolean true']],
+ ['false', 'bool', ['value' => false, 'readable-value' => 'boolean false']],
];
}
@@ -167,6 +156,7 @@ class SetConfigTest extends TestCase {
return [
['123', 'foobar'],
+ [null, 'integer'],
['abc', 'integer'],
['76ggg', 'double'],
['true', 'float'],