<product-id>Horde::Kolab</product-id>
  <display-name>Another lista</display-name>
  <member>
    <display-name>Another  User</display-name>
    <smtp-address>other@debian-vm.local</smtp-address>
    <uid>a2cfdc52365ef429042413bf7717dc85</uid>
  </member>
  <member>
    <display-name>Sample A. User Jr.</display-name>
    <smtp-address>sample@debian-vm.local</smtp-address>
    <uid>f538c7e9ad5a63e4452b7db3bc291231</uid>
  </member>
</distribution-list>
EOL;
$xo = new XMLObject();
$dl = new DistList($xo->readDistList($dlxml, kolabobject::KolabV2));
echo $dl->uid() . "\n\n";
$ml = $dl->members();
for ($i = 0; $i < $ml->size(); $i++) {
    $m = $ml->get($i);
    echo "Member [" . $m->type() . "]: " . $m->uid() . "; " . $m->email() . "\n";
}
$dl2 = new DistList();
$ml = new vectorcontactref();
$m1 = new ContactReference(ContactReference::UidReference, 'some-uid-value');
$ml->push($m1);
$m2 = new ContactReference(ContactReference::EmailReference, 'sample@localhost');
$ml->push($m2);
$dl2->setMembers($ml);
echo $xo->writeDistList($dl2, kolabobject::KolabV2);
echo $xo->writeDistList($dl2, kolabobject::KolabV3);
$d = new cDateTime(2009, 10, 12);
assertequal($e->exceptionDates()->size(), 0, "Event::exceptionDates()");
$e->addExceptionDate($d);
assertequal($e->exceptionDates()->size(), 1, "Event::addExceptionDate()");
$r = new RecurrenceRule();
$r->setFrequency(RecurrenceRule::Minutely);
$bysec = new vectori();
$bysec->push(1);
$bysec->push(3);
$r->setBySecond($bysec);
$e->setRecurrenceRule($r);
$va = new vectoralarm();
$a1 = new Alarm("Display alarm");
$a1->setRelativeStart(new Duration(0, 6, 30, 0, true), kolabformat::Start);
$va->push($a1);
$acr = new vectorcontactref();
$acr->push(new ContactReference("*****@*****.**"));
$a2 = new Alarm("Email alarm", "Alarm description", $acr);
$a2->setStart(new cDateTime(2012, 7, 30, 20, 30, 0, true));
$va->push($a2);
$e->setAlarms($va);
$xml = kolabformat::writeEvent($e);
#print $xml;
assertcontains($xml, '<dtstart><date>2012-07-31</date></dtstart>', "Event::setStart() with date only");
assertcontains($xml, '<created><date-time>2012-03-14T09:05:30Z</date-time></created>', "Event::setCreated() with date-time");
assertcontains($xml, '<rrule><recur><freq>MINUTELY</freq>', "RecurrenceRule::setFrequency()");
assertcontains($xml, '<rrule><recur><freq>MINUTELY</freq><bysecond>1</bysecond><bysecond>3</bysecond></recur></rrule>', "RecurrenceRule::setBySecond()");
assertcontains($xml, '<exdate><date>2009-10-12</date></exdate>', "Event Recurrence Exceptions");
assertcontains($xml, '<duration>-PT6H30M</duration>', "Alarm::setRelativeStart(Duration)");
assertcontains($xml, '<trigger><date-time>2012-07-30T20:30:00Z</date-time>', "Alarm::setStart()");
assertcontains($xml, '<trigger><parameters><related><text>START</text>', "Alarm relative to Start");