summaryrefslogtreecommitdiffstats
path: root/tests/Test/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Test/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php')
-rw-r--r--tests/Test/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php50
1 files changed, 25 insertions, 25 deletions
diff --git a/tests/Test/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php b/tests/Test/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php
index 8ecef60c35d..3c15d51fd61 100644
--- a/tests/Test/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php
+++ b/tests/Test/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php
@@ -107,12 +107,12 @@ class CleanPreviewsBackgroundJobTest extends TestCase {
$this->equalTo(['uid' => 'myuid'])
);
- $this->logger->expects($this->at(0))
+ $this->logger->expects($this->exactly(2))
->method('info')
- ->with($this->equalTo('Started preview cleanup for myuid'));
- $this->logger->expects($this->at(1))
- ->method('info')
- ->with($this->equalTo('New preview cleanup scheduled for myuid'));
+ ->withConsecutive(
+ [$this->equalTo('Started preview cleanup for myuid')],
+ [$this->equalTo('New preview cleanup scheduled for myuid')],
+ );
$this->job->run(['uid' => 'myuid']);
}
@@ -146,12 +146,12 @@ class CleanPreviewsBackgroundJobTest extends TestCase {
$this->jobList->expects($this->never())
->method('add');
- $this->logger->expects($this->at(0))
- ->method('info')
- ->with($this->equalTo('Started preview cleanup for myuid'));
- $this->logger->expects($this->at(1))
+ $this->logger->expects($this->exactly(2))
->method('info')
- ->with($this->equalTo('Preview cleanup done for myuid'));
+ ->withConsecutive(
+ [$this->equalTo('Started preview cleanup for myuid')],
+ [$this->equalTo('Preview cleanup done for myuid')],
+ );
$thumbnailFolder->expects($this->once())
->method('delete');
@@ -165,12 +165,12 @@ class CleanPreviewsBackgroundJobTest extends TestCase {
->with($this->equalTo('myuid'))
->willThrowException(new NotFoundException());
- $this->logger->expects($this->at(0))
- ->method('info')
- ->with($this->equalTo('Started preview cleanup for myuid'));
- $this->logger->expects($this->at(1))
+ $this->logger->expects($this->exactly(2))
->method('info')
- ->with($this->equalTo('Preview cleanup done for myuid'));
+ ->withConsecutive(
+ [$this->equalTo('Started preview cleanup for myuid')],
+ [$this->equalTo('Preview cleanup done for myuid')],
+ );
$this->job->run(['uid' => 'myuid']);
}
@@ -189,12 +189,12 @@ class CleanPreviewsBackgroundJobTest extends TestCase {
->with($this->equalTo('thumbnails'))
->willThrowException(new NotFoundException());
- $this->logger->expects($this->at(0))
- ->method('info')
- ->with($this->equalTo('Started preview cleanup for myuid'));
- $this->logger->expects($this->at(1))
+ $this->logger->expects($this->exactly(2))
->method('info')
- ->with($this->equalTo('Preview cleanup done for myuid'));
+ ->withConsecutive(
+ [$this->equalTo('Started preview cleanup for myuid')],
+ [$this->equalTo('Preview cleanup done for myuid')],
+ );
$this->job->run(['uid' => 'myuid']);
}
@@ -229,12 +229,12 @@ class CleanPreviewsBackgroundJobTest extends TestCase {
$this->jobList->expects($this->never())
->method('add');
- $this->logger->expects($this->at(0))
+ $this->logger->expects($this->exactly(2))
->method('info')
- ->with($this->equalTo('Started preview cleanup for myuid'));
- $this->logger->expects($this->at(1))
- ->method('info')
- ->with($this->equalTo('Preview cleanup done for myuid'));
+ ->withConsecutive(
+ [$this->equalTo('Started preview cleanup for myuid')],
+ [$this->equalTo('Preview cleanup done for myuid')],
+ );
$thumbnailFolder->expects($this->once())
->method('delete')