summaryrefslogtreecommitdiffstats
path: root/tests/lib/Files/Config/UserMountCacheTest.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-25 22:21:27 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-25 22:21:27 +0100
commit2ee65f177e4f7e09ad2287f14d564e7068d322fb (patch)
tree39075e87ea7927e20e8956824cb7c49bf626b178 /tests/lib/Files/Config/UserMountCacheTest.php
parent3cf321fdfc4235a87015a9af2f59c63220016c65 (diff)
downloadnextcloud-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/lib/Files/Config/UserMountCacheTest.php')
-rw-r--r--tests/lib/Files/Config/UserMountCacheTest.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/lib/Files/Config/UserMountCacheTest.php b/tests/lib/Files/Config/UserMountCacheTest.php
index 2f61f634ffb..6f347a504cb 100644
--- a/tests/lib/Files/Config/UserMountCacheTest.php
+++ b/tests/lib/Files/Config/UserMountCacheTest.php
@@ -77,24 +77,24 @@ class UserMountCacheTest extends TestCase {
->getMock();
$storageCache->expects($this->any())
->method('getNumericId')
- ->will($this->returnValue($storageId));
+ ->willReturn($storageId);
$cache = $this->getMockBuilder('\OC\Files\Cache\Cache')
->disableOriginalConstructor()
->getMock();
$cache->expects($this->any())
->method('getId')
- ->will($this->returnValue($rootId));
+ ->willReturn($rootId);
$storage = $this->getMockBuilder('\OC\Files\Storage\Storage')
->disableOriginalConstructor()
->getMock();
$storage->expects($this->any())
->method('getStorageCache')
- ->will($this->returnValue($storageCache));
+ ->willReturn($storageCache);
$storage->expects($this->any())
->method('getCache')
- ->will($this->returnValue($cache));
+ ->willReturn($cache);
return [$storage, $rootId];
}
@@ -401,7 +401,7 @@ class UserMountCacheTest extends TestCase {
$mount1->expects($this->any())
->method('getStorageRootId')
- ->will($this->returnValue($folderId));
+ ->willReturn($folderId);
$this->cache->registerMounts($user1, [$mount1]);
@@ -434,7 +434,7 @@ class UserMountCacheTest extends TestCase {
$mount1->expects($this->any())
->method('getStorageRootId')
- ->will($this->returnValue($folderId));
+ ->willReturn($folderId);
$this->cache->registerMounts($user1, [$mount1]);
@@ -481,11 +481,11 @@ class UserMountCacheTest extends TestCase {
$mount1->expects($this->any())
->method('getStorageRootId')
- ->will($this->returnValue($rootId));
+ ->willReturn($rootId);
$mount1->expects($this->any())
->method('getNumericStorageId')
- ->will($this->returnValue(2));
+ ->willReturn(2);
$this->cache->registerMounts($user1, [$mount1]);