Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2021-03-15 16:24:37 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2021-03-15 16:24:37 +0300
commit51667da1f15c053cfae5f78b1b0eacc4a6b87c17 (patch)
treef64d00e21092981154f4ca16423cafdd7c3b44c6 /tests
parent39aedaa054f74a4ea88566856ddffd23a1d81ad5 (diff)
Log performance of saving a draft
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests')
-rw-r--r--tests/Integration/Service/MailTransmissionIntegrationTest.php4
-rw-r--r--tests/Unit/Service/MailTransmissionTest.php5
2 files changed, 7 insertions, 2 deletions
diff --git a/tests/Integration/Service/MailTransmissionIntegrationTest.php b/tests/Integration/Service/MailTransmissionIntegrationTest.php
index c75441863..8bf24820b 100644
--- a/tests/Integration/Service/MailTransmissionIntegrationTest.php
+++ b/tests/Integration/Service/MailTransmissionIntegrationTest.php
@@ -42,6 +42,7 @@ use OCA\Mail\Service\AccountService;
use OCA\Mail\Service\Attachment\UploadedFile;
use OCA\Mail\Service\MailTransmission;
use OCA\Mail\SMTP\SmtpClientFactory;
+use OCA\Mail\Support\PerformanceLogger;
use OCA\Mail\Tests\Integration\Framework\ImapTest;
use OCA\Mail\Tests\Integration\TestCase;
use OCP\EventDispatcher\IEventDispatcher;
@@ -112,7 +113,8 @@ class MailTransmissionIntegrationTest extends TestCase {
OC::$server->query(IEventDispatcher::class),
OC::$server->query(MailboxMapper::class),
OC::$server->query(MessageMapper::class),
- OC::$server->query(LoggerInterface::class)
+ OC::$server->query(LoggerInterface::class),
+ OC::$server->query(PerformanceLogger::class)
);
}
diff --git a/tests/Unit/Service/MailTransmissionTest.php b/tests/Unit/Service/MailTransmissionTest.php
index ef37d9c2b..cca1ecfef 100644
--- a/tests/Unit/Service/MailTransmissionTest.php
+++ b/tests/Unit/Service/MailTransmissionTest.php
@@ -43,6 +43,7 @@ use OCA\Mail\Model\RepliedMessageData;
use OCA\Mail\Service\AccountService;
use OCA\Mail\Service\MailTransmission;
use OCA\Mail\SMTP\SmtpClientFactory;
+use OCA\Mail\Support\PerformanceLogger;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Folder;
use PHPUnit\Framework\MockObject\MockObject;
@@ -96,6 +97,7 @@ class MailTransmissionTest extends TestCase {
$this->mailboxMapper = $this->createMock(MailboxMapper::class);
$this->messageMapper = $this->createMock(MessageMapper::class);
$this->logger = $this->createMock(LoggerInterface::class);
+ $this->performanceLogger = $this->createMock(PerformanceLogger::class);
$this->transmission = new MailTransmission(
$this->userFolder,
@@ -107,7 +109,8 @@ class MailTransmissionTest extends TestCase {
$this->eventDispatcher,
$this->mailboxMapper,
$this->messageMapper,
- $this->logger
+ $this->logger,
+ $this->performanceLogger
);
}