public function testNormalSendEventNotificationsShouldHaveNoExtensionElements() { $this->sendEventNotifications->value = true; $this->assertEquals($this->sendEventNotifications->value, true); $this->assertEquals(count($this->sendEventNotifications->extensionElements), 0); $newSendEventNotifications = new Zend_Gdata_Calendar_Extension_SendEventNotifications(); $newSendEventNotifications->transferFromXML($this->sendEventNotifications->saveXML()); $this->assertEquals(count($newSendEventNotifications->extensionElements), 0); $newSendEventNotifications->extensionElements = array(new Zend_Gdata_App_Extension_Element('foo', 'atom', null, 'bar')); $this->assertEquals(count($newSendEventNotifications->extensionElements), 1); $this->assertEquals($newSendEventNotifications->value, true); /* try constructing using magic factory */ $cal = new Zend_Gdata_Calendar(); $newSendEventNotifications2 = $cal->newSendEventNotifications(); $newSendEventNotifications2->transferFromXML($newSendEventNotifications->saveXML()); $this->assertEquals(count($newSendEventNotifications2->extensionElements), 1); $this->assertEquals($newSendEventNotifications2->value, true); }