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/lib/Files/Storage | |
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/lib/Files/Storage')
-rw-r--r-- | tests/lib/Files/Storage/Wrapper/QuotaTest.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/lib/Files/Storage/Wrapper/QuotaTest.php b/tests/lib/Files/Storage/Wrapper/QuotaTest.php index 0061ca3910e..164541b670c 100644 --- a/tests/lib/Files/Storage/Wrapper/QuotaTest.php +++ b/tests/lib/Files/Storage/Wrapper/QuotaTest.php @@ -82,7 +82,7 @@ class QuotaTest extends \Test\Files\Storage\Storage { ->getMock(); $storage->expects($this->any()) ->method('free_space') - ->will($this->returnValue(-2)); + ->willReturn(-2); $storage->getScanner()->scan(''); $instance = new \OC\Files\Storage\Wrapper\Quota(array('storage' => $storage, 'quota' => 9)); @@ -138,7 +138,7 @@ class QuotaTest extends \Test\Files\Storage\Storage { ->getMock(); $failStorage->expects($this->any()) ->method('fopen') - ->will($this->returnValue(false)); + ->willReturn(false); $instance = new \OC\Files\Storage\Wrapper\Quota(array('storage' => $failStorage, 'quota' => 1000)); @@ -189,14 +189,14 @@ class QuotaTest extends \Test\Files\Storage\Storage { $cache = $this->getMockBuilder('\OC\Files\Cache\Cache')->disableOriginalConstructor()->getMock(); $storage->expects($this->once()) ->method('getCache') - ->will($this->returnValue($cache)); + ->willReturn($cache); $storage->expects($this->once()) ->method('free_space') - ->will($this->returnValue(2048)); + ->willReturn(2048); $cache->expects($this->once()) ->method('get') ->with('files') - ->will($this->returnValue(new CacheEntry(['size' => 50]))); + ->willReturn(new CacheEntry(['size' => 50])); $instance = new \OC\Files\Storage\Wrapper\Quota(array('storage' => $storage, 'quota' => 1024, 'root' => 'files')); |