public function testNormalPropertyShouldHaveNoExtensionElements() { $this->property->name = "HairColor"; $this->property->value = "Red"; $this->assertEquals("HairColor", $this->property->name); $this->assertEquals("Red", $this->property->value); $this->assertEquals(0, count($this->property->extensionElements)); $newProperty = new Zend_Gdata_Gapps_Extension_Property(); $newProperty->transferFromXML($this->property->saveXML()); $this->assertEquals(0, count($newProperty->extensionElements)); $newProperty->extensionElements = array(new Zend_Gdata_App_Extension_Element('foo', 'atom', null, 'bar')); $this->assertEquals(1, count($newProperty->extensionElements)); $this->assertEquals("HairColor", $newProperty->name); $this->assertEquals("Red", $newProperty->value); /* try constructing using magic factory */ $gdata = new Zend_Gdata_Gapps(); $newProperty2 = $gdata->newProperty(); $newProperty2->transferFromXML($newProperty->saveXML()); $this->assertEquals(1, count($newProperty2->extensionElements)); $this->assertEquals("HairColor", $newProperty2->name); $this->assertEquals("Red", $newProperty2->value); }