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/Group/MetaDataTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/lib/Group/MetaDataTest.php') diff --git a/tests/lib/Group/MetaDataTest.php b/tests/lib/Group/MetaDataTest.php index 4332a6f036f..ebd9cd79f23 100644 --- a/tests/lib/Group/MetaDataTest.php +++ b/tests/lib/Group/MetaDataTest.php @@ -83,7 +83,7 @@ class MetaDataTest extends \Test\TestCase { $this->groupManager->expects($this->once()) ->method('search') ->with('') - ->will($this->returnValue($groups)); + ->willReturn($groups); list($adminGroups, $ordinaryGroups) = $this->groupMetadata->get(); @@ -103,7 +103,7 @@ class MetaDataTest extends \Test\TestCase { $this->groupManager->expects($this->once()) ->method('search') ->with('') - ->will($this->returnValue($groups)); + ->willReturn($groups); list($adminGroups, $ordinaryGroups) = $this->groupMetadata->get(); @@ -121,7 +121,7 @@ class MetaDataTest extends \Test\TestCase { $this->groupManager->expects($this->once()) ->method('search') ->with('') - ->will($this->returnValue($groups)); + ->willReturn($groups); //two calls, if caching fails call counts for group and groupmanager //are exceeded @@ -137,7 +137,7 @@ class MetaDataTest extends \Test\TestCase { ->expects($this->once()) ->method('search') ->with('Foo') - ->will($this->returnValue(['DummyValue'])); + ->willReturn(['DummyValue']); $expected = ['DummyValue']; $this->assertSame($expected, $this->invokePrivate($this->groupMetadata, 'getGroups', ['Foo'])); -- cgit v1.2.3