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/Memcache/CasTraitTest.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/lib/Memcache/CasTraitTest.php')
-rw-r--r-- | tests/lib/Memcache/CasTraitTest.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/lib/Memcache/CasTraitTest.php b/tests/lib/Memcache/CasTraitTest.php index 2f0ef939aa7..61972153886 100644 --- a/tests/lib/Memcache/CasTraitTest.php +++ b/tests/lib/Memcache/CasTraitTest.php @@ -33,27 +33,27 @@ class CasTraitTest extends TestCase { $mock->expects($this->any()) ->method('set') - ->will($this->returnCallback(function ($key, $value, $ttl) use ($sourceCache) { + ->willReturnCallback(function ($key, $value, $ttl) use ($sourceCache) { return $sourceCache->set($key, $value, $ttl); - })); + }); $mock->expects($this->any()) ->method('get') - ->will($this->returnCallback(function ($key) use ($sourceCache) { + ->willReturnCallback(function ($key) use ($sourceCache) { return $sourceCache->get($key); - })); + }); $mock->expects($this->any()) ->method('add') - ->will($this->returnCallback(function ($key, $value, $ttl) use ($sourceCache) { + ->willReturnCallback(function ($key, $value, $ttl) use ($sourceCache) { return $sourceCache->add($key, $value, $ttl); - })); + }); $mock->expects($this->any()) ->method('remove') - ->will($this->returnCallback(function ($key) use ($sourceCache) { + ->willReturnCallback(function ($key) use ($sourceCache) { return $sourceCache->remove($key); - })); + }); return $mock; } |