mirror of
https://github.com/nextcloud/server.git
synced 2026-02-18 18:28:50 -05:00
chore(tests): cleanup previews in teardown
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
1eeed0a170
commit
b2ffff385a
2 changed files with 8 additions and 0 deletions
|
|
@ -24,6 +24,7 @@ class PreviewMapperTest extends TestCase {
|
|||
private IGenerator $snowflake;
|
||||
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->previewMapper = Server::get(PreviewMapper::class);
|
||||
$this->connection = Server::get(IDBConnection::class);
|
||||
$this->snowflake = Server::get(IGenerator::class);
|
||||
|
|
@ -38,6 +39,11 @@ class PreviewMapperTest extends TestCase {
|
|||
$qb->delete('previews')->executeStatement();
|
||||
}
|
||||
|
||||
public function tearDown(): void {
|
||||
$this->previewMapper->deleteAll();
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
public function testGetAvailablePreviews(): void {
|
||||
// Empty
|
||||
$this->assertEquals([], $this->previewMapper->getAvailablePreviews([]));
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ class PreviewServiceTest extends TestCase {
|
|||
private IGenerator $snowflakeGenerator;
|
||||
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->previewService = Server::get(PreviewService::class);
|
||||
$this->previewMapper = Server::get(PreviewMapper::class);
|
||||
$this->snowflakeGenerator = Server::get(IGenerator::class);
|
||||
|
|
@ -33,6 +34,7 @@ class PreviewServiceTest extends TestCase {
|
|||
|
||||
public function tearDown(): void {
|
||||
$this->previewService->deleteAll();
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
public function testGetAvailableFileIds(): void {
|
||||
|
|
|
|||
Loading…
Reference in a new issue