diff options
Diffstat (limited to 'apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php')
-rw-r--r-- | apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php b/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php index 54db20c239e..4a6d3859b03 100644 --- a/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php +++ b/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php @@ -83,7 +83,7 @@ class SharingCheckMiddlewareTest extends \Test\TestCase { ->expects($this->once()) ->method('isEnabledForUser') ->with('files_sharing') - ->will($this->returnValue(true)); + ->willReturn(true); $this->assertTrue(self::invokePrivate($this->sharingCheckMiddleware, 'isSharingEnabled')); } @@ -93,7 +93,7 @@ class SharingCheckMiddlewareTest extends \Test\TestCase { ->expects($this->once()) ->method('isEnabledForUser') ->with('files_sharing') - ->will($this->returnValue(false)); + ->willReturn(false); $this->assertFalse(self::invokePrivate($this->sharingCheckMiddleware, 'isSharingEnabled')); } @@ -142,11 +142,11 @@ class SharingCheckMiddlewareTest extends \Test\TestCase { $this->reflector ->expects($this->atLeastOnce()) ->method('hasAnnotation') - ->will($this->returnValueMap($annotations)); + ->willReturnMap($annotations); $this->config ->method('getAppValue') - ->will($this->returnValueMap($config)); + ->willReturnMap($config); $this->assertEquals($expectedResult, self::invokePrivate($this->sharingCheckMiddleware, 'externalSharesChecks')); } @@ -159,16 +159,16 @@ class SharingCheckMiddlewareTest extends \Test\TestCase { ->expects($this->once()) ->method('isEnabledForUser') ->with('files_sharing') - ->will($this->returnValue(true)); + ->willReturn(true); $this->reflector ->expects($this->atLeastOnce()) ->method('hasAnnotation') - ->will($this->returnValueMap($annotations)); + ->willReturnMap($annotations); $this->config ->method('getAppValue') - ->will($this->returnValueMap($config)); + ->willReturnMap($config); $controller = $this->createMock(ExternalSharesController::class); @@ -191,7 +191,7 @@ class SharingCheckMiddlewareTest extends \Test\TestCase { ->expects($this->once()) ->method('isEnabledForUser') ->with('files_sharing') - ->will($this->returnValue(true)); + ->willReturn(true); $controller = $this->createMock(ShareController::class); @@ -207,7 +207,7 @@ class SharingCheckMiddlewareTest extends \Test\TestCase { ->expects($this->once()) ->method('isEnabledForUser') ->with('files_sharing') - ->will($this->returnValue(false)); + ->willReturn(false); $this->sharingCheckMiddleware->beforeController($this->controllerMock, 'myMethod'); } |