public function testNormalTimezoneShouldHaveNoExtensionElements() { $this->timezone->value = "America/Chicago"; $this->assertEquals($this->timezone->value, "America/Chicago"); $this->assertEquals(count($this->timezone->extensionElements), 0); $newTimezone = new Zend_Gdata_Calendar_Extension_Timezone(); $newTimezone->transferFromXML($this->timezone->saveXML()); $this->assertEquals(count($newTimezone->extensionElements), 0); $newTimezone->extensionElements = array(new Zend_Gdata_App_Extension_Element('foo', 'atom', null, 'bar')); $this->assertEquals(count($newTimezone->extensionElements), 1); $this->assertEquals($newTimezone->value, "America/Chicago"); /* try constructing using magic factory */ $cal = new Zend_Gdata_Calendar(); $newTimezone2 = $cal->newTimezone(); $newTimezone2->transferFromXML($newTimezone->saveXML()); $this->assertEquals(count($newTimezone2->extensionElements), 1); $this->assertEquals($newTimezone2->value, "America/Chicago"); }