public function testNormalCommentsShouldHaveNoExtensionElements() { $this->comments->rel = "http://schemas.google.com/g/2005#regular"; $this->assertEquals("http://schemas.google.com/g/2005#regular", $this->comments->rel); $this->assertEquals(0, count($this->comments->extensionElements)); $newComments = new Zend_Gdata_Extension_Comments(); $newComments->transferFromXML($this->comments->saveXML()); $this->assertEquals(0, count($newComments->extensionElements)); $newComments->extensionElements = array(new Zend_Gdata_App_Extension_Element('foo', 'atom', null, 'bar')); $this->assertEquals(1, count($newComments->extensionElements)); $this->assertEquals("http://schemas.google.com/g/2005#regular", $newComments->rel); /* try constructing using magic factory */ $gdata = new Zend_Gdata(); $newComments2 = $gdata->newComments(); $newComments2->transferFromXML($newComments->saveXML()); $this->assertEquals(1, count($newComments2->extensionElements)); $this->assertEquals("http://schemas.google.com/g/2005#regular", $newComments2->rel); }