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/OCS/ProviderTest.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'tests/lib/OCS') diff --git a/tests/lib/OCS/ProviderTest.php b/tests/lib/OCS/ProviderTest.php index 7ee802e54fb..3a78793f91d 100644 --- a/tests/lib/OCS/ProviderTest.php +++ b/tests/lib/OCS/ProviderTest.php @@ -44,22 +44,22 @@ class ProviderTest extends \Test\TestCase { ->expects($this->at(0)) ->method('isEnabledForUser') ->with('files_sharing') - ->will($this->returnValue(false)); + ->willReturn(false); $this->appManager ->expects($this->at(1)) ->method('isEnabledForUser') ->with('federation') - ->will($this->returnValue(false)); + ->willReturn(false); $this->appManager ->expects($this->at(2)) ->method('isEnabledForUser') ->with('activity') - ->will($this->returnValue(false)); + ->willReturn(false); $this->appManager ->expects($this->at(3)) ->method('isEnabledForUser') ->with('provisioning_api') - ->will($this->returnValue(false)); + ->willReturn(false); $expected = new \OCP\AppFramework\Http\JSONResponse( [ @@ -85,22 +85,22 @@ class ProviderTest extends \Test\TestCase { ->expects($this->at(0)) ->method('isEnabledForUser') ->with('files_sharing') - ->will($this->returnValue(true)); + ->willReturn(true); $this->appManager ->expects($this->at(1)) ->method('isEnabledForUser') ->with('federation') - ->will($this->returnValue(false)); + ->willReturn(false); $this->appManager ->expects($this->at(2)) ->method('isEnabledForUser') ->with('activity') - ->will($this->returnValue(false)); + ->willReturn(false); $this->appManager ->expects($this->at(3)) ->method('isEnabledForUser') ->with('provisioning_api') - ->will($this->returnValue(false)); + ->willReturn(false); $expected = new \OCP\AppFramework\Http\JSONResponse( [ @@ -139,22 +139,22 @@ class ProviderTest extends \Test\TestCase { ->expects($this->at(0)) ->method('isEnabledForUser') ->with('files_sharing') - ->will($this->returnValue(false)); + ->willReturn(false); $this->appManager ->expects($this->at(1)) ->method('isEnabledForUser') ->with('federation') - ->will($this->returnValue(true)); + ->willReturn(true); $this->appManager ->expects($this->at(2)) ->method('isEnabledForUser') ->with('activity') - ->will($this->returnValue(false)); + ->willReturn(false); $this->appManager ->expects($this->at(3)) ->method('isEnabledForUser') ->with('provisioning_api') - ->will($this->returnValue(false)); + ->willReturn(false); $expected = new \OCP\AppFramework\Http\JSONResponse( [ @@ -187,7 +187,7 @@ class ProviderTest extends \Test\TestCase { $this->appManager ->expects($this->any()) ->method('isEnabledForUser') - ->will($this->returnValue(true)); + ->willReturn(true); $expected = new \OCP\AppFramework\Http\JSONResponse( [ -- cgit v1.2.3