Skip to content

Commit 74b6bc7

Browse files
feat: update temp PNG file glob pattern in ImageTest to match all transcoded images
1 parent ee1c88f commit 74b6bc7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/widgets_test/ImageTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@
5151

5252
// The transcoded temp PNG should exist on disk while the widget lives,
5353
// and disappear when destroy() is called.
54-
$tempsBefore = glob(sys_get_temp_dir() . '/phpgui_img_*.png') ?: [];
54+
$tempsBefore = glob(sys_get_temp_dir() . '/phpgui_img_*') ?: [];
5555
TestRunner::assert(count($tempsBefore) >= 1, 'GD transcode produced a temp PNG on disk');
5656

5757
$jpgImage->destroy();
5858
TestRunner::assertWidgetGone($jpgPathOut, 'JPG image label gone after destroy()');
59-
$tempsAfter = glob(sys_get_temp_dir() . '/phpgui_img_*.png') ?: [];
59+
$tempsAfter = glob(sys_get_temp_dir() . '/phpgui_img_*') ?: [];
6060
TestRunner::assert(count($tempsAfter) < count($tempsBefore), 'destroy() unlinks the transcoded temp PNG');
6161
}
6262

0 commit comments

Comments
 (0)