2 commits - src/php

Thomas Brüderli bruederli at kolabsys.com
Wed Jun 6 10:43:22 CEST 2012


 src/php/test.php |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

New commits:
commit 4a1b01da6d45e7fec5c4a6101ff73a24770e31d7
Merge: f530d6d e0ac86c
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Wed Jun 6 10:07:56 2012 +0200

    Merge branch 'master' of ssh://git.kolab.org/git/libkolabxml



commit f530d6dd9bb6058e0f443de8db2e8d8e5cd020f7
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Wed Jun 6 10:07:47 2012 +0200

    Add tests for configuration objects

diff --git a/src/php/test.php b/src/php/test.php
index 8ecc8c3..1da42f2 100755
--- a/src/php/test.php
+++ b/src/php/test.php
@@ -189,6 +189,32 @@ assertcontains($xml, '<fn><text>DalistÄÖŸ</text></fn>', "kolabformat::writeDi
 assertcontains($xml, '<uri>mailto:Member%2DA%3Ca%40localhost%3E</uri>', "kolabformat::writeDistlist(): mailto uri");
 assertcontains($xml, '<member><uri>urn:uuid:x-member-b-fff</uri>', "kolabformat::writeDistlist(): member urn::uuid");
 
+
+
+/////// Test Configuration.Dictionary
+
+$d = new Dictionary('de');
+$d->setEntries(array2vector(array('Kolab','Roundcube','libkolabxml')));
+$c = new Configuration($d);
+
+$xml = kolabformat::writeConfiguration($c);
+#print $xml;
+$c2 = kolabformat::readConfiguration($xml, false);
+$d2 = $c2->dictionary();
+
+assertequal($d2->language(), 'de', "Configuration.Dictionary::language");
+assertequal($d2->entries()->size(), 3, "Dictionary::entries()");
+
+$d = new Dictionary('en');
+$d->setEntries(array2vector(array('Kolab','Roundcube','libkolabxml')));
+$c = new Configuration($d);
+
+$xml = kolabformat::writeConfiguration($c);
+#print $xml;
+$c3 = kolabformat::readConfiguration($xml, false);
+
+asserttrue($c2->uid() != $c3->uid(), "Generate different UIDs for configuration objects");
+
 ?>
 
 





More information about the commits mailing list