From bba3c98cec3621844f2ea2d3cf29ad9382921943 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 30 Oct 2020 02:01:33 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/image/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/image/functions.php b/tests/phpunit/tests/image/functions.php index 116acd4ab4..1694c1e7f1 100644 --- a/tests/phpunit/tests/image/functions.php +++ b/tests/phpunit/tests/image/functions.php @@ -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 ); } }