1 '; $result = $this->parse($xml, ['{DAV:}sync-collection' => 'Sabre\\DAV\\Xml\\Request\SyncCollectionReport']); $elem = new SyncCollectionReport(); $elem->syncLevel = 1; $elem->properties = ['{DAV:}foo']; $this->assertEquals($elem, $result['value']); } function testDeserializeLimit() { $xml = ' 1 5 '; $result = $this->parse($xml, ['{DAV:}sync-collection' => 'Sabre\\DAV\\Xml\\Request\SyncCollectionReport']); $elem = new SyncCollectionReport(); $elem->syncLevel = 1; $elem->properties = ['{DAV:}foo']; $elem->limit = 5; $this->assertEquals($elem, $result['value']); } function testDeserializeInfinity() { $xml = ' infinity '; $result = $this->parse($xml, ['{DAV:}sync-collection' => 'Sabre\\DAV\\Xml\\Request\SyncCollectionReport']); $elem = new SyncCollectionReport(); $elem->syncLevel = \Sabre\DAV\Server::DEPTH_INFINITY; $elem->properties = ['{DAV:}foo']; $this->assertEquals($elem, $result['value']); } /** * @expectedException \Sabre\DAV\Exception\BadRequest */ function testDeserializeMissingElem() { $xml = ' '; $result = $this->parse($xml, ['{DAV:}sync-collection' => 'Sabre\\DAV\\Xml\\Request\SyncCollectionReport']); } }