File tree Expand file tree Collapse file tree 5 files changed +59
-3
lines changed
tests/Sabre/CardDAV/Xml/Request Expand file tree Collapse file tree 5 files changed +59
-3
lines changed Original file line number Diff line number Diff line change 11ChangeLog
22=========
33
4+ 3.2.2 (2017-02-14)
5+ ------------------
6+
7+ * #943 : Fix CardDAV XML reporting bug, which was affecting several CardDAV
8+ clients. Bug was introduced in 3.2.1.
9+ * The zip release ships with [ sabre/vobject 4.1.2] [ vobj ] ,
10+ [ sabre/http 4.2.2] [ http ] , [ sabre/event 3.0.0] [ evnt ] ,
11+ [ sabre/uri 1.2.0] [ uri ] and [ sabre/xml 1.5.0] [ xml ] .
12+
13+
4143.2.1 (2017-01-28)
515------------------
616
Original file line number Diff line number Diff line change 3232 "psr/log" : " ^1.0"
3333 },
3434 "require-dev" : {
35- "phpunit/phpunit" : " > 4.8, <= 6.0.0" ,
35+ "phpunit/phpunit" : " > 4.8, <6.0.0" ,
3636 "evert/phpdoc-md" : " ~0.1.0" ,
3737 "sabre/cs" : " ^1.0.0" ,
3838 "monolog/monolog" : " ^1.18"
Original file line number Diff line number Diff line change @@ -56,7 +56,6 @@ static function xmlDeserialize(Reader $reader) {
5656 return $ element ['attributes ' ]['name ' ];
5757 }, $ elems );
5858
59- $ reader ->next ();
6059 return $ result ;
6160
6261 }
Original file line number Diff line number Diff line change @@ -14,6 +14,6 @@ class Version {
1414 /**
1515 * Full version number
1616 */
17- const VERSION = '3.2.1 ' ;
17+ const VERSION = '3.2.2 ' ;
1818
1919}
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Sabre \CardDAV \Xml \Request ;
4+
5+ use Sabre \DAV \Xml \XmlTest ;
6+
7+ class AddressBookMultiGetTest extends XmlTest {
8+
9+ protected $ elementMap = [
10+ '{urn:ietf:params:xml:ns:carddav}addressbook-multiget ' => 'Sabre \\CardDAV \\Xml \\Request\AddressBookMultiGetReport ' ,
11+ ];
12+
13+ function testDeserialize () {
14+
15+ /* lines look a bit odd but this triggers an XML parsing bug */
16+ $ xml = <<<XML
17+ <?xml version='1.0' encoding='UTF-8' ?>
18+ <CARD:addressbook-multiget xmlns="DAV:" xmlns:CARD="urn:ietf:params:xml:ns:carddav">
19+ <prop>
20+ <getcontenttype />
21+ <getetag />
22+ <CARD:address-data content-type="text/vcard" version="4.0" /></prop><href>/foo.vcf</href>
23+ </CARD:addressbook-multiget>
24+ XML ;
25+
26+ $ result = $ this ->parse ($ xml );
27+ $ addressBookMultiGetReport = new AddressBookMultiGetReport ();
28+ $ addressBookMultiGetReport ->properties = [
29+ '{DAV:}getcontenttype ' ,
30+ '{DAV:}getetag ' ,
31+ '{urn:ietf:params:xml:ns:carddav}address-data ' ,
32+ ];
33+ $ addressBookMultiGetReport ->hrefs = ['/foo.vcf ' ];
34+ $ addressBookMultiGetReport ->contentType = 'text/vcard ' ;
35+ $ addressBookMultiGetReport ->version = '4.0 ' ;
36+ $ addressBookMultiGetReport ->addressDataProperties = [];
37+
38+
39+ $ this ->assertEquals (
40+ $ addressBookMultiGetReport ,
41+ $ result ['value ' ]
42+ );
43+
44+ }
45+
46+
47+ }
You can’t perform that action at this time.
0 commit comments