Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-26 00:21:27 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-26 00:21:27 +0300
commit2ee65f177e4f7e09ad2287f14d564e7068d322fb (patch)
tree39075e87ea7927e20e8956824cb7c49bf626b178 /tests/lib/OCS
parent3cf321fdfc4235a87015a9af2f59c63220016c65 (diff)
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.php26
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(
[