Tests: Remove the `GLOB_BRACE` flag for `glob()` function from unit tests.

The flag was previously used in PDF preview tests when cleaning up temporary files.

As noted in the PHP documentation, the flag is not available on some non-GNU systems, like Solaris or Alpine Linux.

Follow-up to [40130].

Props amykamala, sawanoboly.
Fixes #51661.

git-svn-id: https://develop.svn.wordpress.org/trunk@49450 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-10-30 02:01:33 +00:00
parent 3b706fc512
commit bba3c98cec
1 changed files with 2 additions and 2 deletions

View File

@ -20,9 +20,9 @@ class Tests_Image_Functions extends WP_UnitTestCase {
require_once DIR_TESTDATA . '/../includes/mock-image-editor.php';
// Ensure no legacy / failed tests detritus.
$folder = get_temp_dir() . 'wordpress-gsoc-flyer*.{jpg,pdf}';
$folder = get_temp_dir() . 'wordpress-gsoc-flyer*.*';
foreach ( glob( $folder, GLOB_BRACE ) as $file ) {
foreach ( glob( $folder ) as $file ) {
unlink( $file );
}
}