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/lib/Memcache/CasTraitTest.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/lib/Memcache/CasTraitTest.php') 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; } -- cgit v1.2.3