diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-08-28 19:25:54 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-08-29 13:00:40 +0300 |
commit | f40aba36d6356acb23cd0fb6aa9e6584f69fdca3 (patch) | |
tree | 572320b9584e8e60f41aa8bc4e21295768834aa9 /tests/FolderTest.php | |
parent | 3cc08ff470a716fd7177fc84f89c64ca772ffe8e (diff) |
Add a database cache for mailbox data
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/FolderTest.php')
-rw-r--r-- | tests/FolderTest.php | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/FolderTest.php b/tests/FolderTest.php index c0649376c..5d9f9e876 100644 --- a/tests/FolderTest.php +++ b/tests/FolderTest.php @@ -29,8 +29,8 @@ use PHPUnit_Framework_MockObject_MockObject; class FolderTest extends TestCase { - /** @var Account|PHPUnit_Framework_MockObject_MockObject */ - private $account; + /** @var int */ + private $accountId; /** @var Horde_Imap_Client_Mailbox|PHPUnit_Framework_MockObject_MockObject */ private $mailbox; @@ -39,10 +39,10 @@ class FolderTest extends TestCase { private $folder; private function mockFolder(array $attributes = [], $delimiter = '.') { - $this->account = $this->createMock(Account::class); + $this->accountId = 15; $this->mailbox = $this->createMock(Horde_Imap_Client_Mailbox::class); - $this->folder = new Folder($this->account, $this->mailbox, $attributes, $delimiter); + $this->folder = new Folder($this->accountId, $this->mailbox, $attributes, $delimiter); } public function testGetMailbox() { @@ -131,9 +131,6 @@ class FolderTest extends TestCase { ->method('__get') ->with($this->equalTo('utf8')) ->willReturn('Sent'); - $this->account->expects($this->once()) - ->method('getId') - ->willReturn(123); $this->folder->setDisplayName('Gesendet'); $this->folder->addSpecialUse('sent'); @@ -145,7 +142,7 @@ class FolderTest extends TestCase { $expected = [ 'id' => base64_encode('Sent'), - 'accountId' => 123, + 'accountId' => 15, 'name' => 'Gesendet', 'specialRole' => null, 'unseen' => 13, |