mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-03 15:27:42 +02:00
[ticket/14168] Reset sequence before tests in delete tests
PHPBB3-14168
This commit is contained in:
@@ -65,6 +65,13 @@ class phpbb_attachment_delete_test extends \phpbb_database_test_case
|
|||||||
*/
|
*/
|
||||||
public function test_attachment_delete($mode, $ids, $resync, $expected)
|
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));
|
$this->assertSame($expected, $this->attachment_delete->delete($mode, $ids, $resync));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user