public function testNormalExtendedPropertyShouldHaveNoExtensionElements() { $this->extendedProperty->name = "http://www.example.com/schemas/2007#mycal.foo"; $this->extendedProperty->value = "5678"; $this->assertEquals("http://www.example.com/schemas/2007#mycal.foo", $this->extendedProperty->name); $this->assertEquals("5678", $this->extendedProperty->value); $this->assertEquals(0, count($this->extendedProperty->extensionElements)); $newExtendedProperty = new Zend_Gdata_Extension_ExtendedProperty(); $newExtendedProperty->transferFromXML($this->extendedProperty->saveXML()); $this->assertEquals(0, count($newExtendedProperty->extensionElements)); $newExtendedProperty->extensionElements = array( new Zend_Gdata_App_Extension_Element('foo', 'atom', null, 'bar')); $this->assertEquals(1, count($newExtendedProperty->extensionElements)); $this->assertEquals("http://www.example.com/schemas/2007#mycal.foo", $newExtendedProperty->name); $this->assertEquals("5678", $newExtendedProperty->value); /* try constructing using magic factory */ $gdata = new Zend_Gdata(); $newExtendedProperty2 = $gdata->newExtendedProperty(); $newExtendedProperty2->transferFromXML($newExtendedProperty->saveXML()); $this->assertEquals(1, count($newExtendedProperty2->extensionElements)); $this->assertEquals("http://www.example.com/schemas/2007#mycal.foo", $newExtendedProperty2->name); $this->assertEquals("5678", $newExtendedProperty2->value); }