@@ -1213,32 +1213,34 @@ public function theFollowingLocalStoragesShouldExist(TableNode $mountPoints) {
1213
1213
* @throws Exception
1214
1214
*/
1215
1215
public function theFollowingLocalStoragesShouldNotExist (TableNode $ mountPoints ) {
1216
+ $ createdLocalStorage = [];
1216
1217
$ this ->listLocalStorageMount ();
1217
1218
$ expectedLocalStorages = $ mountPoints ->getColumnsHash ();
1218
1219
$ commandOutput = \json_decode ($ this ->featureContext ->getStdOutOfOccCommand ());
1219
1220
foreach ($ commandOutput as $ i ) {
1220
- $ this -> createdLocalStorage [$ i ->mount_id ] = \ltrim ($ i ->mount_point , '/ ' );
1221
+ $ createdLocalStorage [$ i ->mount_id ] = \ltrim ($ i ->mount_point , '/ ' );
1221
1222
}
1222
1223
foreach ($ expectedLocalStorages as $ i ) {
1223
- Assert::assertNotContains ($ i ['localStorage ' ], $ this -> createdLocalStorage );
1224
+ Assert::assertNotContains ($ i ['localStorage ' ], $ createdLocalStorage );
1224
1225
}
1225
1226
}
1226
1227
1227
1228
/**
1228
- * @When the administrator deletes folder :folder using occ command
1229
+ * @When the administrator deletes local storage :folder using occ command
1229
1230
*
1230
1231
* @param string $folder
1231
1232
*
1232
1233
* @return void
1233
1234
* @throws Exception
1234
1235
*/
1235
1236
public function administratorDeletesFolder ($ folder ) {
1237
+ $ createdLocalStorage = [];
1236
1238
$ this ->listLocalStorageMount ();
1237
1239
$ commandOutput = \json_decode ($ this ->featureContext ->getStdOutOfOccCommand ());
1238
1240
foreach ($ commandOutput as $ i ) {
1239
- $ this -> createdLocalStorage [$ i ->mount_id ] = \ltrim ($ i ->mount_point , '/ ' );
1241
+ $ createdLocalStorage [$ i ->mount_id ] = \ltrim ($ i ->mount_point , '/ ' );
1240
1242
}
1241
- foreach ($ this -> createdLocalStorage as $ key => $ value ) {
1243
+ foreach ($ createdLocalStorage as $ key => $ value ) {
1242
1244
if ($ value === $ folder ) {
1243
1245
$ mount_id = $ key ;
1244
1246
}
@@ -1247,7 +1249,6 @@ public function administratorDeletesFolder($folder) {
1247
1249
throw new Exception ("Id not found for folder to be deleted " );
1248
1250
}
1249
1251
$ this ->invokingTheCommand ('files_external:delete --yes ' . $ mount_id );
1250
- unset($ this ->createdLocalStorage [$ mount_id ]);
1251
1252
}
1252
1253
1253
1254
/**
0 commit comments