'Sabre\\CalDAV\\Xml\\Request\\Share', ]; function testDeserialize() { $xml = << mailto:eric@example.com Eric York Shared workspace mailto:foo@bar XML; $result = $this->parse($xml); $share = new Share( [ [ 'href' => 'mailto:eric@example.com', 'commonName' => 'Eric York', 'summary' => 'Shared workspace', 'readOnly' => false, ] ], [ 'mailto:foo@bar', ] ); $this->assertEquals( $share, $result['value'] ); } function testDeserializeMininal() { $xml = << mailto:eric@example.com XML; $result = $this->parse($xml); $share = new Share( [ [ 'href' => 'mailto:eric@example.com', 'commonName' => null, 'summary' => null, 'readOnly' => true, ] ], [] ); $this->assertEquals( $share, $result['value'] ); } }