public function it_does_not_add_attachments_if_empty(AttachmentCollection $attachments) { $attachments->count()->shouldBeCalled(); $attachments->jsonSerialize()->shouldNotBeCalled(); $this->offsetSet('attachments', $attachments); $this->jsonSerialize(); }