Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/Integration/Service/DraftServiceIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
namespace OCA\Mail\Tests\Integration\Service;

use ChristophWurst\Nextcloud\Testing\TestUser;
use OC;
use OCA\Mail\Account;
use OCA\Mail\Contracts\IAttachmentService;
use OCA\Mail\Contracts\IMailManager;
Expand All @@ -33,6 +32,7 @@
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Folder;
use OCP\IDBConnection;
use OCP\IServerContainer;
use OCP\IUser;
use OCP\Server;
Expand Down Expand Up @@ -106,10 +106,10 @@ protected function setUp(): void {
$this->accountService = $this->createMock(AccountService::class);
$this->timeFactory = $this->createMock(ITimeFactory::class);

$db = OC::$server->getDatabaseConnection();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹

$db = Server::get(IDBConnection::class);
$qb = $db->getQueryBuilder();
$delete = $qb->delete($this->mapper->getTableName());
$delete->execute();
$delete->executeStatement();

$this->service = new DraftsService(
$this->transmission,
Expand Down
6 changes: 3 additions & 3 deletions tests/Integration/Service/OutboxServiceIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

use ChristophWurst\Nextcloud\Testing\TestUser;
use Horde_Imap_Client;
use OC;
use OCA\Mail\Account;
use OCA\Mail\Contracts\IAttachmentService;
use OCA\Mail\Contracts\IMailManager;
Expand All @@ -35,6 +34,7 @@
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Folder;
use OCP\IDBConnection;
use OCP\IServerContainer;
use OCP\IUser;
use OCP\Server;
Expand Down Expand Up @@ -107,10 +107,10 @@ protected function setUp(): void {
$this->timeFactory = Server::get(ITimeFactory::class);
$this->chain = Server::get(Chain::class);

$this->db = OC::$server->getDatabaseConnection();
$this->db = Server::get(IDBConnection::class);
$qb = $this->db->getQueryBuilder();
$delete = $qb->delete($this->mapper->getTableName());
$delete->execute();
$delete->executeStatement();

$this->outbox = new OutboxService(
$this->mapper,
Expand Down