public function testNormalQuotaShouldHaveNoExtensionElements() { $this->quota->limit = "123456789"; $this->assertEquals("123456789", $this->quota->limit); $this->assertEquals(0, count($this->quota->extensionElements)); $newQuota = new Extension\Quota(); $newQuota->transferFromXML($this->quota->saveXML()); $this->assertEquals(0, count($newQuota->extensionElements)); $newQuota->extensionElements = array(new \Zend\GData\App\Extension\Element('foo', 'atom', null, 'bar')); $this->assertEquals(1, count($newQuota->extensionElements)); $this->assertEquals("123456789", $newQuota->limit); /* try constructing using magic factory */ $gdata = new \Zend\GData\GApps\GApps(); $newQuota2 = $gdata->newQuota(); $newQuota2->transferFromXML($newQuota->saveXML()); $this->assertEquals(1, count($newQuota2->extensionElements)); $this->assertEquals("123456789", $newQuota2->limit); }