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/OCS | |
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/OCS')
-rw-r--r-- | tests/lib/OCS/ProviderTest.php | 26 |
1 files changed, 13 insertions, 13 deletions
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( [ |