aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php')
-rw-r--r--tests/lib/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php20
1 files changed, 9 insertions, 11 deletions
diff --git a/tests/lib/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php b/tests/lib/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php
index 3c5583c49da..fc88ee5d226 100644
--- a/tests/lib/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php
+++ b/tests/lib/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
@@ -71,8 +72,7 @@ class CleanPreviewsBackgroundJobTest extends TestCase {
$thumbnailFolder->expects($this->never())
->method('delete');
- $this->timeFactory->method('getTime')
- ->will($this->onConsecutiveCalls(100, 200));
+ $this->timeFactory->method('getTime')->willReturnOnConsecutiveCalls(100, 200);
$this->jobList->expects($this->once())
->method('add')
@@ -84,7 +84,7 @@ class CleanPreviewsBackgroundJobTest extends TestCase {
$loggerCalls = [];
$this->logger->expects($this->exactly(2))
->method('info')
- ->willReturnCallback(function () use (&$loggerCalls) {
+ ->willReturnCallback(function () use (&$loggerCalls): void {
$loggerCalls[] = func_get_args();
});
@@ -118,8 +118,7 @@ class CleanPreviewsBackgroundJobTest extends TestCase {
$thumbnailFolder->method('getDirectoryListing')
->willReturn([$previewFolder1]);
- $this->timeFactory->method('getTime')
- ->will($this->onConsecutiveCalls(100, 101));
+ $this->timeFactory->method('getTime')->willReturnOnConsecutiveCalls(100, 101);
$this->jobList->expects($this->never())
->method('add');
@@ -127,7 +126,7 @@ class CleanPreviewsBackgroundJobTest extends TestCase {
$loggerCalls = [];
$this->logger->expects($this->exactly(2))
->method('info')
- ->willReturnCallback(function () use (&$loggerCalls) {
+ ->willReturnCallback(function () use (&$loggerCalls): void {
$loggerCalls[] = func_get_args();
});
@@ -150,7 +149,7 @@ class CleanPreviewsBackgroundJobTest extends TestCase {
$loggerCalls = [];
$this->logger->expects($this->exactly(2))
->method('info')
- ->willReturnCallback(function () use (&$loggerCalls) {
+ ->willReturnCallback(function () use (&$loggerCalls): void {
$loggerCalls[] = func_get_args();
});
@@ -178,7 +177,7 @@ class CleanPreviewsBackgroundJobTest extends TestCase {
$loggerCalls = [];
$this->logger->expects($this->exactly(2))
->method('info')
- ->willReturnCallback(function () use (&$loggerCalls) {
+ ->willReturnCallback(function () use (&$loggerCalls): void {
$loggerCalls[] = func_get_args();
});
@@ -213,8 +212,7 @@ class CleanPreviewsBackgroundJobTest extends TestCase {
$thumbnailFolder->method('getDirectoryListing')
->willReturn([$previewFolder1]);
- $this->timeFactory->method('getTime')
- ->will($this->onConsecutiveCalls(100, 101));
+ $this->timeFactory->method('getTime')->willReturnOnConsecutiveCalls(100, 101);
$this->jobList->expects($this->never())
->method('add');
@@ -226,7 +224,7 @@ class CleanPreviewsBackgroundJobTest extends TestCase {
$loggerCalls = [];
$this->logger->expects($this->exactly(2))
->method('info')
- ->willReturnCallback(function () use (&$loggerCalls) {
+ ->willReturnCallback(function () use (&$loggerCalls): void {
$loggerCalls[] = func_get_args();
});