Changeset 54304 for trunk/tests/phpunit/includes/abstract-testcase.php
- Timestamp:
- 09/25/2022 04:47:02 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/abstract-testcase.php
r54303 r54304 1351 1351 * 1352 1352 * @since 4.0.0 1353 * @since 6.1.0 Removes the empty directory if there are no files left.1354 1353 * 1355 1354 * @param string $path Directory path. 1356 1355 */ 1357 1356 public function rmdir( $path ) { 1358 if ( ! is_dir( $path ) ) {1359 return;1360 }1361 1362 1357 $files = $this->files_in_dir( $path ); 1363 1358 foreach ( $files as $file ) { … … 1365 1360 $this->unlink( $file ); 1366 1361 } 1367 }1368 1369 /*1370 * If there were no ignored files, remove the empty directory.1371 * If there are any nested empty directories, remove them too.1372 */1373 if ( ! array_intersect( $files, self::$ignore_files ) ) {1374 $this->delete_folders( $path );1375 1362 } 1376 1363 }
Note: See TracChangeset
for help on using the changeset viewer.