diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-06-16 15:55:05 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-06-16 15:55:05 +0200 |
commit | f8a5be6a9071b3b9704242ee65f8b3a21402abe9 (patch) | |
tree | 750b7333e959bec51cbbfc9b0d754d40ba0566c3 /apps/theming/tests/ImageManagerTest.php | |
parent | 0c14ee6ff5a2d3aa3f77f8cd2bf331590ee62f44 (diff) | |
download | nextcloud-server-f8a5be6a9071b3b9704242ee65f8b3a21402abe9.tar.gz nextcloud-server-f8a5be6a9071b3b9704242ee65f8b3a21402abe9.zip |
Remove deprecated at matcher from theming tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/theming/tests/ImageManagerTest.php')
-rw-r--r-- | apps/theming/tests/ImageManagerTest.php | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/apps/theming/tests/ImageManagerTest.php b/apps/theming/tests/ImageManagerTest.php index 10faf6c1da1..6a9b77234bb 100644 --- a/apps/theming/tests/ImageManagerTest.php +++ b/apps/theming/tests/ImageManagerTest.php @@ -100,20 +100,21 @@ class ImageManagerTest extends TestCase { $file->expects($this->once()) ->method('getContent') ->willReturn(file_get_contents(__DIR__ . '/../../../tests/data/testimage.png')); - $folder->expects($this->at(0)) + $folder->expects($this->exactly(2)) ->method('fileExists') - ->with('logo') - ->willReturn(true); - $folder->expects($this->at(1)) - ->method('fileExists') - ->with('logo.png') - ->willReturn(false); - $folder->expects($this->at(2)) + ->withConsecutive( + ['logo'], + ['logo.png'], + )->willReturnOnConsecutiveCalls( + true, + false, + ); + $folder->expects($this->once()) ->method('getFile') ->with('logo') ->willReturn($file); $newFile = $this->createMock(ISimpleFile::class); - $folder->expects($this->at(3)) + $folder->expects($this->once()) ->method('newFile') ->with('logo.png') ->willReturn($newFile); @@ -211,15 +212,15 @@ class ImageManagerTest extends TestCase { ->method('getAppValue') ->with('theming', 'cachebuster', '0') ->willReturn('0'); - $this->appData->expects($this->at(0)) + $this->appData->expects($this->exactly(2)) ->method('getFolder') - ->willThrowException(new NotFoundException()); - $this->appData->expects($this->at(1)) - ->method('newFolder') ->with('0') - ->willReturn($folder); - $this->appData->expects($this->at(2)) - ->method('getFolder') + ->willReturnOnConsecutiveCalls( + $this->throwException(new NotFoundException()), + $folder, + ); + $this->appData->expects($this->once()) + ->method('newFolder') ->with('0') ->willReturn($folder); $this->appData->expects($this->once()) @@ -290,7 +291,7 @@ class ImageManagerTest extends TestCase { ->method('getAppValue') ->with('theming', 'cachebuster', '0') ->willReturn('0'); - $this->appData->expects($this->at(0)) + $this->appData->expects($this->once()) ->method('getFolder') ->with('0') ->willReturn($folder); |