mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #60744 from nextcloud/test/noid/phpunit-db-test-isolation
test(db): call parent::tearDown() in DB test classes that skipped it
This commit is contained in:
commit
f1915e0dd4
8 changed files with 8 additions and 0 deletions
|
|
@ -68,6 +68,7 @@ class ResourcesRoomsUpdaterTest extends TestCase {
|
|||
$query->delete('calendar_resources_md')->executeStatement();
|
||||
$query->delete('calendar_rooms')->executeStatement();
|
||||
$query->delete('calendar_rooms_md')->executeStatement();
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ class AdapterTest extends TestCase {
|
|||
->from('appconfig')
|
||||
->where($qb->expr()->eq('appid', $qb->createNamedParameter($this->appId)))
|
||||
->executeStatement();
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
public function testInsertIgnoreOnConflictDuplicate(): void {
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ class UserMountCacheTest extends TestCase {
|
|||
->where($builder->expr()->eq('fileid', new Literal($fileId)))
|
||||
->executeStatement();
|
||||
}
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
private function getStorage($storageId, $rootInternalPath = '') {
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ class LoaderTest extends TestCase {
|
|||
'mimetype', $deleteMimetypes->createPositionalParameter('testing/%')
|
||||
));
|
||||
$deleteMimetypes->executeStatement();
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ class PreviewMigrationJobTest extends TestCase {
|
|||
$qb->delete('filecache')
|
||||
->where($qb->expr()->eq('fileid', $qb->createNamedParameter(5)))
|
||||
->executeStatement();
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
#[TestDox('Test the migration from the legacy flat hierarchy to the new database format')]
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
|
|||
$this->dbConn->getQueryBuilder()->delete('share')->executeStatement();
|
||||
$this->dbConn->getQueryBuilder()->delete('filecache')->runAcrossAllShards()->executeStatement();
|
||||
$this->dbConn->getQueryBuilder()->delete('storages')->executeStatement();
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ class ShareByMailProviderTest extends TestCase {
|
|||
$this->dbConn->getQueryBuilder()->delete('share')->executeStatement();
|
||||
$this->dbConn->getQueryBuilder()->delete('filecache')->runAcrossAllShards()->executeStatement();
|
||||
$this->dbConn->getQueryBuilder()->delete('storages')->executeStatement();
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ class SubAdminTest extends \Test\TestCase {
|
|||
->where($qb->expr()->eq('uid', $qb->createNamedParameter('orphanedUser')))
|
||||
->orWhere($qb->expr()->eq('gid', $qb->createNamedParameter('orphanedGroup')))
|
||||
->executeStatement();
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
public function testCreateSubAdmin(): void {
|
||||
|
|
|
|||
Loading…
Reference in a new issue