Skip to content

Commit

Permalink
fixup! add sorting capabilities to mail
Browse files Browse the repository at this point in the history
Signed-off-by: hamza221 <[email protected]>
  • Loading branch information
hamza221 committed Jul 21, 2023
1 parent 625dd2b commit 7d98c9a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
10 changes: 5 additions & 5 deletions lib/Contracts/IMailSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ public function findMessage(Account $account,
* @throws ServiceException
*/
public function findMessages(Account $account,
Mailbox $mailbox,
string $sortOrder,
?string $filter,
?int $cursor,
?int $limit): array;
Mailbox $mailbox,
string $sortOrder,
?string $filter,
?int $cursor,
?int $limit): array;

/**
* @param IUser $user
Expand Down
4 changes: 3 additions & 1 deletion tests/Unit/Controller/PageControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ public function testIndex(): void {
['debug', false, true],
['version', '0.0.0', '26.0.0'],
['app.mail.attachment-size-limit', 0, 123],
['sort-order', 'newest', 'newest'],
]);
$this->config->expects($this->exactly(6))
->method('getAppValue')
Expand Down Expand Up @@ -267,7 +268,7 @@ public function testIndex(): void {
->method('getLoginCredentials')
->willReturn($loginCredentials);

$this->initialState->expects($this->exactly(12))
$this->initialState->expects($this->exactly(13))
->method('provideInitialState')
->withConsecutive(
['debug', true],
Expand All @@ -282,6 +283,7 @@ public function testIndex(): void {
['disable-scheduled-send', false],
['allow-new-accounts', true],
['smime-certificates', []],
['sort-order', 'newest'],
);

$expected = new TemplateResponse($this->appName, 'index', [
Expand Down
4 changes: 3 additions & 1 deletion tests/Unit/Service/Search/MailSearchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @copyright 2020 Christoph Wurst <[email protected]>
*
* @author 2020 Christoph Wurst <[email protected]>
*
*/MailSearchTest.php:99
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -94,6 +94,7 @@ public function testFindMessagesNotCached() {
$this->search->findMessages(
$account,
$mailbox,
'newest',
null,
null,
null
Expand All @@ -109,6 +110,7 @@ public function testFindMessagesLocked() {
$this->search->findMessages(
$account,
$mailbox,
'newest',
null,
null,
null
Expand Down

0 comments on commit 7d98c9a

Please sign in to comment.