/** * @test */ public function it_flags_the_messages_as_answered() { $imap = $this->getImap(); /** @noinspection PhpUndefinedMethodInspection */ $imap->shouldReceive('setFlag')->with('1,2', '\\Answered')->andReturn(true); $mailboxManager = new ImapMailboxService($imap); $mailboxManager->flagAsAnswered('1,2'); }