public function testNormalHiddenShouldHaveNoExtensionElements() { $this->hidden->value = true; $this->assertEquals($this->hidden->value, true); $this->assertEquals(count($this->hidden->extensionElements), 0); $newHidden = new Zend_Gdata_Calendar_Extension_Hidden(); $newHidden->transferFromXML($this->hidden->saveXML()); $this->assertEquals(count($newHidden->extensionElements), 0); $newHidden->extensionElements = array(new Zend_Gdata_App_Extension_Element('foo', 'atom', null, 'bar')); $this->assertEquals(count($newHidden->extensionElements), 1); $this->assertEquals($newHidden->value, true); /* try constructing using magic factory */ $cal = new Zend_Gdata_Calendar(); $newHidden2 = $cal->newHidden(); $newHidden2->transferFromXML($newHidden->saveXML()); $this->assertEquals(count($newHidden2->extensionElements), 1); $this->assertEquals($newHidden2->value, true); }