/** * @test */ public function it_should_create_a_new_child_folder_with_a_slash_delimiter() { $imap = $this->getImap(false); /** @noinspection PhpUndefinedMethodInspection */ $this->mailbox->shouldReceive('getMailboxName')->with(true)->andReturn('{imap.example.com:993/imap/ssl}'); /** @noinspection PhpUndefinedMethodInspection */ $imap->shouldReceive('createMailbox')->with('{imap.example.com:993/imap/ssl}FOO/BAR'); $mailboxManager = new ImapMailboxService($imap); $mailboxManager->createFolder('BAR', 'FOO', '/'); }