public function testDeserialize() { $event = $this->createDemoEvent(); $serializer = new EventXmlSerializer(); $eventXmlElement = $this->getDemoEventElement(); $eventFromXml = $serializer->deserialize($eventXmlElement); $this->assertEquals($event->getDocumentname(), $eventFromXml->getDocumentname()); $this->assertEquals($event->getDocumentdescription(), $eventFromXml->getDocumentdescription()); $this->assertEquals($event->getEventenddate(), $eventFromXml->getEventenddate()); $this->assertEquals((bool) $event->getEventonline(), (bool) $eventFromXml->getEventonline()); }
protected function deserializeEvent(DOMNode $eventElement) { $serializer = new EventXmlSerializer(); return $serializer->deserialize($eventElement); }