aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files/ViewTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Files/ViewTest.php')
-rw-r--r--tests/lib/Files/ViewTest.php55
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']));
}