diff --git a/lib/Contracts/IMailSearch.php b/lib/Contracts/IMailSearch.php index 078bcf4bdd..31ee989834 100644 --- a/lib/Contracts/IMailSearch.php +++ b/lib/Contracts/IMailSearch.php @@ -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 diff --git a/tests/Unit/Controller/PageControllerTest.php b/tests/Unit/Controller/PageControllerTest.php index 1d8fcac433..f24057c151 100644 --- a/tests/Unit/Controller/PageControllerTest.php +++ b/tests/Unit/Controller/PageControllerTest.php @@ -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') @@ -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], @@ -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', [ diff --git a/tests/Unit/Service/Search/MailSearchTest.php b/tests/Unit/Service/Search/MailSearchTest.php index d89cc41583..247584fb7c 100644 --- a/tests/Unit/Service/Search/MailSearchTest.php +++ b/tests/Unit/Service/Search/MailSearchTest.php @@ -6,7 +6,7 @@ * @copyright 2020 Christoph Wurst * * @author 2020 Christoph Wurst - * + */MailSearchTest.php:99 * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -94,6 +94,7 @@ public function testFindMessagesNotCached() { $this->search->findMessages( $account, $mailbox, + 'newest', null, null, null @@ -109,6 +110,7 @@ public function testFindMessagesLocked() { $this->search->findMessages( $account, $mailbox, + 'newest', null, null, null