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());
 }
예제 #2
0
 protected function deserializeEvent(DOMNode $eventElement)
 {
     $serializer = new EventXmlSerializer();
     return $serializer->deserialize($eventElement);
 }