@@ -108,6 +108,7 @@ public function testSync(): void {
108
108
$ folders = [
109
109
$ this ->createMock (Folder::class),
110
110
$ this ->createMock (Folder::class),
111
+ $ this ->createMock (Folder::class),
111
112
];
112
113
$ status = [
113
114
'unseen ' => 10 ,
@@ -117,24 +118,27 @@ public function testSync(): void {
117
118
$ folders [0 ]->method ('getMailbox ' )->willReturn ('mb1 ' );
118
119
$ folders [1 ]->method ('getStatus ' )->willReturn ($ status );
119
120
$ folders [1 ]->method ('getMailbox ' )->willReturn ('mb2 ' );
121
+ $ folders [2 ]->method ('getStatus ' )->willReturn ($ status );
122
+ $ folders [2 ]->method ('getMailbox ' )->willReturn ('mb3 ' );
120
123
$ this ->folderMapper ->expects ($ this ->once ())
121
124
->method ('getFolders ' )
122
125
->with ($ account , $ client )
123
126
->willReturn ($ folders );
124
127
$ this ->folderMapper ->expects ($ this ->once ())
125
128
->method ('getFoldersStatusAsObject ' )
126
- ->with ($ client , self ::equalToCanonicalizing (['mb1 ' , 'mb2 ' ,]))
129
+ ->with ($ client , self ::equalToCanonicalizing (['mb1 ' , 'mb2 ' , ' mb3 ' , ]))
127
130
->willReturn ([
128
131
'mb1 ' => new MailboxStats (1 , 2 ),
129
132
'mb2 ' => new MailboxStats (1 , 2 ),
133
+ /* no status for mb3 */
130
134
]);
131
135
$ this ->folderMapper ->expects ($ this ->once ())
132
136
->method ('detectFolderSpecialUse ' )
133
137
->with ($ folders );
134
- $ this ->mailboxMapper ->expects (self ::exactly (2 ))
138
+ $ this ->mailboxMapper ->expects (self ::exactly (3 ))
135
139
->method ('insert ' )
136
140
->willReturnArgument (0 );
137
- $ this ->mailboxMapper ->expects (self ::exactly (2 ))
141
+ $ this ->mailboxMapper ->expects (self ::exactly (3 ))
138
142
->method ('update ' )
139
143
->willReturnArgument (0 );
140
144
$ this ->dispatcher
0 commit comments