Skip to content

Commit 8e7d16e

Browse files
committed
conflicts resolved
1 parent d4c3f70 commit 8e7d16e

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

tests/acceptance/features/bootstrap/OccContext.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,32 +1213,34 @@ public function theFollowingLocalStoragesShouldExist(TableNode $mountPoints) {
12131213
* @throws Exception
12141214
*/
12151215
public function theFollowingLocalStoragesShouldNotExist(TableNode $mountPoints) {
1216+
$createdLocalStorage = [];
12161217
$this->listLocalStorageMount();
12171218
$expectedLocalStorages = $mountPoints->getColumnsHash();
12181219
$commandOutput = \json_decode($this->featureContext->getStdOutOfOccCommand());
12191220
foreach ($commandOutput as $i) {
1220-
$this->createdLocalStorage[$i->mount_id] = \ltrim($i->mount_point, '/');
1221+
$createdLocalStorage[$i->mount_id] = \ltrim($i->mount_point, '/');
12211222
}
12221223
foreach ($expectedLocalStorages as $i) {
1223-
Assert::assertNotContains($i['localStorage'], $this->createdLocalStorage);
1224+
Assert::assertNotContains($i['localStorage'], $createdLocalStorage);
12241225
}
12251226
}
12261227

12271228
/**
1228-
* @When the administrator deletes folder :folder using occ command
1229+
* @When the administrator deletes local storage :folder using occ command
12291230
*
12301231
* @param string $folder
12311232
*
12321233
* @return void
12331234
* @throws Exception
12341235
*/
12351236
public function administratorDeletesFolder($folder) {
1237+
$createdLocalStorage = [];
12361238
$this->listLocalStorageMount();
12371239
$commandOutput = \json_decode($this->featureContext->getStdOutOfOccCommand());
12381240
foreach ($commandOutput as $i) {
1239-
$this->createdLocalStorage[$i->mount_id] = \ltrim($i->mount_point, '/');
1241+
$createdLocalStorage[$i->mount_id] = \ltrim($i->mount_point, '/');
12401242
}
1241-
foreach ($this->createdLocalStorage as $key => $value) {
1243+
foreach ($createdLocalStorage as $key => $value) {
12421244
if ($value === $folder) {
12431245
$mount_id = $key;
12441246
}
@@ -1247,7 +1249,6 @@ public function administratorDeletesFolder($folder) {
12471249
throw new Exception("Id not found for folder to be deleted");
12481250
}
12491251
$this->invokingTheCommand('files_external:delete --yes ' . $mount_id);
1250-
unset($this->createdLocalStorage[$mount_id]);
12511252
}
12521253

12531254
/**

tests/acceptance/features/cliLocalStorage/deleteLocalStorage.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Feature: create local storage from the command line
99
And the administrator has created the local storage mount "new_local_storage"
1010
And the administrator has uploaded file with content "file in local storage" to "/local_storage2/file-in-local-storage.txt"
1111
And the administrator has uploaded file with content "new file" to "/new_local_storage/new-file"
12-
When the administrator deletes folder "local_storage2" using occ command
12+
When the administrator deletes local storage "local_storage2" using occ command
1313
Then the following local storage should not exist
1414
| localStorage |
1515
| local_storage2 |

0 commit comments

Comments
 (0)