aboutsummaryrefslogtreecommitdiffstats
path: root/tests/attachment/delete_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/attachment/delete_test.php')
-rw-r--r--tests/attachment/delete_test.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/attachment/delete_test.php b/tests/attachment/delete_test.php
index 19a5e0bcca..df7e305dc5 100644
--- a/tests/attachment/delete_test.php
+++ b/tests/attachment/delete_test.php
@@ -65,6 +65,13 @@ class phpbb_attachment_delete_test extends \phpbb_database_test_case
*/
public function test_attachment_delete($mode, $ids, $resync, $expected)
{
+ // We need to reset the attachment ID sequence to properly test this
+ if ($this->db->get_sql_layer() === 'postgres')
+ {
+ $sql = 'ALTER SEQUENCE phpbb_attachments_seq RESTART WITH 1';
+ $this->db->sql_query($sql);
+ }
+
$this->assertSame($expected, $this->attachment_delete->delete($mode, $ids, $resync));
}
}