public function testSetChecksConsistencyButAllowsEmptyDescs()
 {
     $col = new MessageCollection();
     // both message have not desc
     $msg = new Message('a');
     $msg2 = new Message('a');
     $col->set($msg);
     $col->set($msg2);
     // first message have a desc
     $msg = new Message('b');
     $msg->setDesc('b');
     $msg2 = new Message('b');
     $col->set($msg);
     $col->set($msg2);
     // second message have a desc
     $msg = new Message('c');
     $msg2 = new Message('c');
     $msg2->setDesc('c');
     $col->set($msg);
     $col->set($msg2);
     // non-null empty descs
     $msg = new Message('d');
     $msg->setDesc('d');
     $msg2 = new Message('d');
     $msg2->setDesc('');
     $col->set($msg);
     $col->set($msg2);
 }
 /**
  * @param MessageCollection $domain
  */
 public function merge(MessageCollection $domain)
 {
     foreach ($domain->all() as $id => $message) {
         $this->add($message);
     }
 }