diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-08-11 20:52:39 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-08-11 21:37:22 +0300 |
commit | f973d977c9967e2c86215cf539468c9475e22d35 (patch) | |
tree | 6fb0e3506de533d3dbf2aa8ef63de3da0847956c /tests/FolderTest.php | |
parent | 4f218589c120ebbf904715a2eb064f2a675422c1 (diff) |
Move some usage of the old Folder to the more versatile Mailbox
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/FolderTest.php')
-rw-r--r-- | tests/FolderTest.php | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/tests/FolderTest.php b/tests/FolderTest.php index f2c7798ba..c45d107aa 100644 --- a/tests/FolderTest.php +++ b/tests/FolderTest.php @@ -66,18 +66,6 @@ class FolderTest extends TestCase { $this->assertSame(['\noselect'], $this->folder->getAttributes()); } - public function testAddFolder() { - $this->mockFolder(['\noselect']); - $subFolder = $this->createMock(Folder::class); - $subFolder->expects($this->once()) - ->method('getMailbox') - ->willReturn('INBOX/FLAGED'); - - $this->folder->addFolder($subFolder); - - $this->assertCount(1, $this->folder->getFolders()); - } - public function testSetStatus() { $this->mockFolder(); @@ -96,57 +84,4 @@ class FolderTest extends TestCase { $this->assertCount(1, $this->folder->getSpecialUse()); $this->assertSame('flagged', $this->folder->getSpecialUse()[0]); } - - public function testIsSearchable() { - $this->mockFolder([]); - - $this->assertTrue($this->folder->isSearchable()); - } - - public function testIsNotSearchable() { - $this->mockFolder(['\noselect']); - - $this->assertFalse($this->folder->isSearchable()); - } - - public function testJsonSerialize() { - $this->mockFolder(); - $subFolder = $this->createMock(Folder::class); - - $subFolder->expects($this->exactly(2)) - ->method('getMailbox') - ->willReturn('Archive'); - $subFolder->expects($this->once()) - ->method('jsonSerialize') - ->willReturn(['subdir data']); - $this->mailbox->expects($this->exactly(2)) - ->method('__get') - ->with($this->equalTo('utf8')) - ->willReturn('Sent'); - - $this->folder->addSpecialUse('sent'); - $this->folder->setStatus([ - 'unseen' => 13, - 'messages' => 333, - ]); - $this->folder->addFolder($subFolder); - - $expected = [ - 'id' => base64_encode('Sent'), - 'accountId' => 15, - 'displayName' => 'Sent', - 'specialRole' => null, - 'unseen' => 13, - 'total' => 333, - 'isEmpty' => false, - 'noSelect' => false, - 'attributes' => [], - 'delimiter' => '.', - 'folders' => [['subdir data']], - 'specialRole' => 'sent', - 'specialUse' => ['sent'], - 'syncToken' => null, - ]; - $this->assertEquals($expected, $this->folder->jsonSerialize()); - } } |