From 2ee65f177e4f7e09ad2287f14d564e7068d322fb Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Wed, 25 Mar 2020 22:21:27 +0100 Subject: Use the shorter phpunit syntax for mocked return values Signed-off-by: Christoph Wurst --- tests/Core/Command/Log/FileTest.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/Core/Command/Log/FileTest.php') 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') -- cgit v1.2.3