Skip to content

Commit be9bded

Browse files
committed
folder status test added
1 parent f71f6da commit be9bded

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tests/live/FolderTest.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,31 @@ public function testUnsubscribe(): void {
347347
self::assertTrue(str_starts_with($status[0], 'OK'));
348348
}
349349

350+
/**
351+
* Test Folder::status()
352+
*
353+
* @return void
354+
* @throws AuthFailedException
355+
* @throws ConnectionFailedException
356+
* @throws FolderFetchingException
357+
* @throws ImapBadRequestException
358+
* @throws ImapServerErrorException
359+
* @throws MaskNotFoundException
360+
* @throws ResponseException
361+
* @throws RuntimeException
362+
*/
363+
public function testStatus(): void {
364+
$folder = $this->getFolder('INBOX');
365+
self::assertInstanceOf(Folder::class, $folder);
366+
367+
$status = $folder->getStatus();
368+
self::assertEquals(0, $status['MESSAGES']);
369+
self::assertEquals(0, $status['RECENT']);
370+
self::assertEquals(0, $status['UNSEEN']);
371+
self::assertGreaterThan(0, $status['UIDNEXT']);
372+
self::assertGreaterThan(0, $status['UIDVALIDITY']);
373+
}
374+
350375
/**
351376
* Test Folder::examine()
352377
*

0 commit comments

Comments
 (0)