Skip to content

Commit f1915e0

Browse files
Merge pull request #60744 from nextcloud/test/noid/phpunit-db-test-isolation
test(db): call parent::tearDown() in DB test classes that skipped it
2 parents 9ecf114 + a9f177e commit f1915e0

8 files changed

Lines changed: 8 additions & 0 deletions

File tree

tests/lib/Calendar/ResourcesRoomsUpdaterTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ protected function tearDown(): void {
6868
$query->delete('calendar_resources_md')->executeStatement();
6969
$query->delete('calendar_rooms')->executeStatement();
7070
$query->delete('calendar_rooms_md')->executeStatement();
71+
parent::tearDown();
7172
}
7273

7374
/**

tests/lib/DB/AdapterTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public function tearDown(): void {
2929
->from('appconfig')
3030
->where($qb->expr()->eq('appid', $qb->createNamedParameter($this->appId)))
3131
->executeStatement();
32+
parent::tearDown();
3233
}
3334

3435
public function testInsertIgnoreOnConflictDuplicate(): void {

tests/lib/Files/Config/UserMountCacheTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ protected function tearDown(): void {
9090
->where($builder->expr()->eq('fileid', new Literal($fileId)))
9191
->executeStatement();
9292
}
93+
parent::tearDown();
9394
}
9495

9596
private function getStorage($storageId, $rootInternalPath = '') {

tests/lib/Files/Type/LoaderTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ protected function tearDown(): void {
3131
'mimetype', $deleteMimetypes->createPositionalParameter('testing/%')
3232
));
3333
$deleteMimetypes->executeStatement();
34+
parent::tearDown();
3435
}
3536

3637

tests/lib/Preview/PreviewMigrationJobTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ public function tearDown(): void {
103103
$qb->delete('filecache')
104104
->where($qb->expr()->eq('fileid', $qb->createNamedParameter(5)))
105105
->executeStatement();
106+
parent::tearDown();
106107
}
107108

108109
#[TestDox('Test the migration from the legacy flat hierarchy to the new database format')]

tests/lib/Share20/DefaultShareProviderTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ protected function tearDown(): void {
127127
$this->dbConn->getQueryBuilder()->delete('share')->executeStatement();
128128
$this->dbConn->getQueryBuilder()->delete('filecache')->runAcrossAllShards()->executeStatement();
129129
$this->dbConn->getQueryBuilder()->delete('storages')->executeStatement();
130+
parent::tearDown();
130131
}
131132

132133
/**

tests/lib/Share20/ShareByMailProviderTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ protected function tearDown(): void {
134134
$this->dbConn->getQueryBuilder()->delete('share')->executeStatement();
135135
$this->dbConn->getQueryBuilder()->delete('filecache')->runAcrossAllShards()->executeStatement();
136136
$this->dbConn->getQueryBuilder()->delete('storages')->executeStatement();
137+
parent::tearDown();
137138
}
138139

139140
/**

tests/lib/SubAdminTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ protected function tearDown(): void {
100100
->where($qb->expr()->eq('uid', $qb->createNamedParameter('orphanedUser')))
101101
->orWhere($qb->expr()->eq('gid', $qb->createNamedParameter('orphanedGroup')))
102102
->executeStatement();
103+
parent::tearDown();
103104
}
104105

105106
public function testCreateSubAdmin(): void {

0 commit comments

Comments
 (0)