diff options
author | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2022-06-21 11:45:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-21 11:45:00 +0200 |
commit | fd8f2aff09c93b81c120a05e0441a1677d8dde7c (patch) | |
tree | 9168addbe74aa1bac9a5b73164f04c607f68c5bb /tests/lib/Files/ViewTest.php | |
parent | 20fc8d8f30012edcd9f1d4e92dd4704bc5b77492 (diff) | |
parent | 6a1510f8ee48494a19dc1239fd2584dc2188e18d (diff) | |
download | nextcloud-server-fd8f2aff09c93b81c120a05e0441a1677d8dde7c.tar.gz nextcloud-server-fd8f2aff09c93b81c120a05e0441a1677d8dde7c.zip |
Merge pull request #32901 from nextcloud/fix/remove-at-matcher-in-lib-tests
Remove at matcher uses in tests/lib
Diffstat (limited to 'tests/lib/Files/ViewTest.php')
-rw-r--r-- | tests/lib/Files/ViewTest.php | 55 |
1 files changed, 21 insertions, 34 deletions
diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index 7b735720ff1..37cd8414a05 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -2643,44 +2643,31 @@ class ViewTest extends \Test\TestCase { ]) ->getMock(); - $view - ->expects($this->at(0)) - ->method('is_file') - ->with('/new') - ->willReturn(false); - $view - ->expects($this->at(1)) - ->method('file_exists') - ->with('/new') - ->willReturn(true); - $view - ->expects($this->at(2)) - ->method('is_file') - ->with('/new/folder') - ->willReturn(false); - $view - ->expects($this->at(3)) - ->method('file_exists') - ->with('/new/folder') - ->willReturn(false); - $view - ->expects($this->at(4)) - ->method('mkdir') - ->with('/new/folder'); - $view - ->expects($this->at(5)) + $view->expects($this->exactly(3)) ->method('is_file') - ->with('/new/folder/structure') + ->withConsecutive( + ['/new'], + ['/new/folder'], + ['/new/folder/structure'], + ) ->willReturn(false); - $view - ->expects($this->at(6)) + $view->expects($this->exactly(3)) ->method('file_exists') - ->with('/new/folder/structure') - ->willReturn(false); - $view - ->expects($this->at(7)) + ->withConsecutive( + ['/new'], + ['/new/folder'], + ['/new/folder/structure'], + )->willReturnOnConsecutiveCalls( + true, + false, + false, + ); + $view->expects($this->exactly(2)) ->method('mkdir') - ->with('/new/folder/structure'); + ->withConsecutive( + ['/new/folder'], + ['/new/folder/structure'], + ); $this->assertTrue(self::invokePrivate($view, 'createParentDirectories', ['/new/folder/structure'])); } |