/** * Test mailbox creation. */ public function testCreateMailBox() { $imap = $this->getMock('Fetch\\Imap', array('open', 'createMailbox')); $imap->expects($this->once())->method('createMailbox')->with($this->anything(), $this->equalTo('{imap.example.com:143/novalidate-cert}mailbox')); $server = new Server('imap.example.com'); $server->setImap($imap); $server->createMailBox('mailbox'); }