summaryrefslogtreecommitdiffstats
path: root/tests/Core
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-07-14 15:09:47 +0200
committerJoas Schilling <coding@schilljs.com>2016-07-14 15:09:47 +0200
commitaaf2be4c3d47395155bdd7c508efc14a54dee512 (patch)
tree5624c85b6065a3a18227dfec5315a95fb887d335 /tests/Core
parent4656b79c8ebf94086e9287ee2580671e3fb68027 (diff)
downloadnextcloud-server-aaf2be4c3d47395155bdd7c508efc14a54dee512.tar.gz
nextcloud-server-aaf2be4c3d47395155bdd7c508efc14a54dee512.zip
Use argument instead of value
Diffstat (limited to 'tests/Core')
-rw-r--r--tests/Core/Command/User/SettingTest.php38
1 files changed, 18 insertions, 20 deletions
diff --git a/tests/Core/Command/User/SettingTest.php b/tests/Core/Command/User/SettingTest.php
index b05ee42d2dd..002e8dfef2f 100644
--- a/tests/Core/Command/User/SettingTest.php
+++ b/tests/Core/Command/User/SettingTest.php
@@ -107,37 +107,37 @@ class SettingTest extends TestCase {
],
[
- [['uid', 'username'], ['key', 'configkey']],
+ [['uid', 'username'], ['key', 'configkey'], ['value', '']],
[['ignore-missing-user', true]],
- [['--value', true]],
+ [],
false,
false,
],
[
- [['uid', 'username'], ['key', '']],
+ [['uid', 'username'], ['key', ''], ['value', '']],
[['ignore-missing-user', true]],
- [['--value', true]],
+ [],
false,
- 'The "value" option can only be used when specifying a key.',
+ 'The value argument can only be used when specifying a key.',
],
[
- [['uid', 'username'], ['key', 'configkey']],
+ [['uid', 'username'], ['key', 'configkey'], ['value', '']],
[['ignore-missing-user', true]],
- [['--value', true], ['--default-value', true]],
+ [['--default-value', true]],
false,
- 'The "value" option can not be used together with "default-value".',
+ 'The value argument can not be used together with "default-value".',
],
[
- [['uid', 'username'], ['key', 'configkey']],
+ [['uid', 'username'], ['key', 'configkey'], ['value', '']],
[['ignore-missing-user', true], ['update-only', true]],
- [['--value', true]],
+ [],
false,
false,
],
[
- [['uid', 'username'], ['key', 'configkey']],
+ [['uid', 'username'], ['key', 'configkey'], ['value', null]],
[['ignore-missing-user', true], ['update-only', true]],
- [['--value', false]],
+ [],
false,
'The "update-only" option can only be used together with "value".',
],
@@ -164,9 +164,9 @@ class SettingTest extends TestCase {
'The "delete" option can not be used together with "default-value".',
],
[
- [['uid', 'username'], ['key', 'configkey']],
+ [['uid', 'username'], ['key', 'configkey'], ['value', '']],
[['ignore-missing-user', true], ['delete', true]],
- [['--value', true]],
+ [],
false,
'The "delete" option can not be used together with "value".',
],
@@ -324,12 +324,13 @@ class SettingTest extends TestCase {
'getUserSettings',
]);
- $this->consoleInput->expects($this->any())
+ $this->consoleInput->expects($this->atLeast(4))
->method('getArgument')
->willReturnMap([
['uid', 'username'],
['app', 'appname'],
['key', 'configkey'],
+ ['value', 'setValue'],
]);
$command->expects($this->once())
@@ -343,7 +344,6 @@ class SettingTest extends TestCase {
$this->consoleInput->expects($this->atLeastOnce())
->method('hasParameterOption')
->willReturnMap([
- ['--value', true],
['--update-only', $updateOnly],
]);
@@ -351,10 +351,8 @@ class SettingTest extends TestCase {
$this->consoleOutput->expects($this->never())
->method('writeln');
- $this->consoleInput->expects($this->once())
- ->method('getOption')
- ->with('value')
- ->willReturn('setValue');
+ $this->consoleInput->expects($this->never())
+ ->method('getOption');
$this->config->expects($this->once())
->method('setUserValue')