diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-25 22:21:27 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-25 22:21:27 +0100 |
commit | 2ee65f177e4f7e09ad2287f14d564e7068d322fb (patch) | |
tree | 39075e87ea7927e20e8956824cb7c49bf626b178 /tests/Core/Command/Log/FileTest.php | |
parent | 3cf321fdfc4235a87015a9af2f59c63220016c65 (diff) | |
download | nextcloud-server-2ee65f177e4f7e09ad2287f14d564e7068d322fb.tar.gz nextcloud-server-2ee65f177e4f7e09ad2287f14d564e7068d322fb.zip |
Use the shorter phpunit syntax for mocked return values
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/Core/Command/Log/FileTest.php')
-rw-r--r-- | tests/Core/Command/Log/FileTest.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/Core/Command/Log/FileTest.php b/tests/Core/Command/Log/FileTest.php index 524a193d86f..c1d005e0c56 100644 --- a/tests/Core/Command/Log/FileTest.php +++ b/tests/Core/Command/Log/FileTest.php @@ -53,9 +53,9 @@ class FileTest extends TestCase { public function testEnable() { $this->consoleInput->method('getOption') - ->will($this->returnValueMap([ + ->willReturnMap([ ['enable', 'true'] - ])); + ]); $this->config->expects($this->once()) ->method('setSystemValue') ->with('log_type', 'file'); @@ -65,9 +65,9 @@ class FileTest extends TestCase { public function testChangeFile() { $this->consoleInput->method('getOption') - ->will($this->returnValueMap([ + ->willReturnMap([ ['file', '/foo/bar/file.log'] - ])); + ]); $this->config->expects($this->once()) ->method('setSystemValue') ->with('logfile', '/foo/bar/file.log'); @@ -89,9 +89,9 @@ class FileTest extends TestCase { */ public function testChangeRotateSize($optionValue, $configValue) { $this->consoleInput->method('getOption') - ->will($this->returnValueMap([ + ->willReturnMap([ ['rotate-size', $optionValue] - ])); + ]); $this->config->expects($this->once()) ->method('setSystemValue') ->with('log_rotate_size', $configValue); @@ -101,12 +101,12 @@ class FileTest extends TestCase { public function testGetConfiguration() { $this->config->method('getSystemValue') - ->will($this->returnValueMap([ + ->willReturnMap([ ['log_type', 'file', 'log_type_value'], ['datadirectory', \OC::$SERVERROOT.'/data', '/data/directory/'], ['logfile', '/data/directory/nextcloud.log', '/var/log/nextcloud.log'], ['log_rotate_size', 100 * 1024 * 1024, 5 * 1024 * 1024], - ])); + ]); $this->consoleOutput->expects($this->at(0)) ->method('writeln') |