From 5cb0b267d315a5453589eb50c51dd7e375816ca7 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 27 Jun 2023 22:34:44 +0200 Subject: [PATCH] [ticket/15687] Adjust regex for attachment URL PHPBB3-15687 --- tests/functional/acp_attachments_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/acp_attachments_test.php b/tests/functional/acp_attachments_test.php index bed79eaaf2..099a38c329 100644 --- a/tests/functional/acp_attachments_test.php +++ b/tests/functional/acp_attachments_test.php @@ -86,7 +86,7 @@ class phpbb_functional_acp_attachments_test extends phpbb_functional_test_case // Get attach id, the link looks similar to ./download/attachment/3 $attach_link = $crawler->filter('span.file-name > a')->attr('href'); $matches = []; - preg_match('/\/([0-9]+)$/', $attach_link, $matches); + preg_match('/\/([0-9]+)\/valid\.jpg$/', $attach_link, $matches); $attach_id = (int) $matches[1]; // Set file time older than 3 hours to consider it orphan