mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-17 14:18:24 +01:00
Merge pull request #6330 from rxu/ticket/16910-master
[ticket/16910] Fix ACP orphan attachments module tests
This commit is contained in:
commit
76922413bf
@ -82,9 +82,12 @@ class phpbb_functional_acp_attachments_test extends phpbb_functional_test_case
|
|||||||
|
|
||||||
// Also the file name should be in the first row of the files table
|
// Also the file name should be in the first row of the files table
|
||||||
$this->assertEquals('valid.jpg', $crawler->filter('span.file-name > a')->text());
|
$this->assertEquals('valid.jpg', $crawler->filter('span.file-name > a')->text());
|
||||||
|
|
||||||
|
// Get attach id, the link looks similar to ./download/attachment/3
|
||||||
$attach_link = $crawler->filter('span.file-name > a')->attr('href');
|
$attach_link = $crawler->filter('span.file-name > a')->attr('href');
|
||||||
$attach_id = $this->get_parameter_from_link($attach_link, 'id');
|
$matches = [];
|
||||||
|
preg_match('/\/([0-9]+)$/', $attach_link, $matches);
|
||||||
|
$attach_id = (int) $matches[1];
|
||||||
|
|
||||||
// Set file time older than 3 hours to consider it orphan
|
// Set file time older than 3 hours to consider it orphan
|
||||||
$sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
|
$sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
|
||||||
|
Loading…
x
Reference in New Issue
Block a user