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 /apps/dav/tests/unit/Upload/ChunkingPluginTest.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 'apps/dav/tests/unit/Upload/ChunkingPluginTest.php')
-rw-r--r-- | apps/dav/tests/unit/Upload/ChunkingPluginTest.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/dav/tests/unit/Upload/ChunkingPluginTest.php b/apps/dav/tests/unit/Upload/ChunkingPluginTest.php index d0eeed78678..d338c5b31f1 100644 --- a/apps/dav/tests/unit/Upload/ChunkingPluginTest.php +++ b/apps/dav/tests/unit/Upload/ChunkingPluginTest.php @@ -80,7 +80,7 @@ class ChunkingPluginTest extends TestCase { $this->tree->expects($this->any()) ->method('getNodeForPath') ->with('source') - ->will($this->returnValue($node)); + ->willReturn($node); $this->response->expects($this->never()) ->method('setStatus'); @@ -96,11 +96,11 @@ class ChunkingPluginTest extends TestCase { $this->tree->expects($this->any()) ->method('getNodeForPath') ->with('source') - ->will($this->returnValue($sourceNode)); + ->willReturn($sourceNode); $this->tree->expects($this->any()) ->method('nodeExists') ->with('target') - ->will($this->returnValue(false)); + ->willReturn(false); $this->response->expects($this->never()) ->method('setStatus'); $this->request->expects($this->once()) @@ -120,11 +120,11 @@ class ChunkingPluginTest extends TestCase { $this->tree->expects($this->any()) ->method('getNodeForPath') ->with('source') - ->will($this->returnValue($sourceNode)); + ->willReturn($sourceNode); $this->tree->expects($this->any()) ->method('nodeExists') ->with('target') - ->will($this->returnValue(true)); + ->willReturn(true); $this->tree->expects($this->once()) ->method('move') ->with('source', 'target'); @@ -156,7 +156,7 @@ class ChunkingPluginTest extends TestCase { $this->tree->expects($this->any()) ->method('getNodeForPath') ->with('source') - ->will($this->returnValue($sourceNode)); + ->willReturn($sourceNode); $this->request->expects($this->once()) ->method('getHeader') ->with('OC-Total-Length') |