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-12-09 11:51:39 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2021-12-09 15:28:55 +0300
commit170be23c8d83c18561d8c7f0bc5d02e4bb6c4565 (patch)
tree700acac0dd4fa663d834c18b87fdfbbcb77788b2 /tests
parent4fc5828e47ce210a99d515931bd8c57705aff240 (diff)
Add debug logs to the imap message mapper findByIds
This can show if unexpected results are fetched. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests')
-rw-r--r--tests/Unit/IMAP/MessageMapperTest.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/Unit/IMAP/MessageMapperTest.php b/tests/Unit/IMAP/MessageMapperTest.php
index 80011fe20..ee7d49b61 100644
--- a/tests/Unit/IMAP/MessageMapperTest.php
+++ b/tests/Unit/IMAP/MessageMapperTest.php
@@ -54,7 +54,7 @@ class MessageMapperTest extends TestCase {
);
}
- public function testGetByIds() {
+ public function testGetByIds(): void {
/** @var Horde_Imap_Client_Socket|MockObject $imapClient */
$imapClient = $this->createMock(Horde_Imap_Client_Socket::class);
$mailbox = 'inbox';
@@ -63,16 +63,14 @@ class MessageMapperTest extends TestCase {
$fetchResults = new Horde_Imap_Client_Fetch_Results();
$fetchResult1 = $this->createMock(Horde_Imap_Client_Data_Fetch::class);
$fetchResult2 = $this->createMock(Horde_Imap_Client_Data_Fetch::class);
- $imapClient->expects($this->once())
+ $imapClient->expects(self::once())
->method('fetch')
->willReturn($fetchResults);
$fetchResults[0] = $fetchResult1;
$fetchResults[1] = $fetchResult2;
- $fetchResult1->expects($this->once())
- ->method('getUid')
+ $fetchResult1->method('getUid')
->willReturn(1);
- $fetchResult2->expects($this->once())
- ->method('getUid')
+ $fetchResult2->method('getUid')
->willReturn(3);
$message1 = new IMAPMessage($imapClient, $mailbox, 1, $fetchResult1);
$message2 = new IMAPMessage($imapClient, $mailbox, 3, $fetchResult2);