Ejemplo n.º 1
0
 public function testExtensionAttributes() {
     $extensionAttributes = $this->who->extensionAttributes;
     $extensionAttributes['foo1'] = array('name'=>'foo1', 'value'=>'bar');
     $extensionAttributes['foo2'] = array('name'=>'foo2', 'value'=>'rab');
     $this->who->extensionAttributes = $extensionAttributes;
     $this->assertEquals('bar', $this->who->extensionAttributes['foo1']['value']);
     $this->assertEquals('rab', $this->who->extensionAttributes['foo2']['value']);
     $whoXml = $this->who->saveXML();
     $newWho = new Zend_Gdata_Extension_Who();
     $newWho->transferFromXML($whoXml);
     $this->assertEquals('bar', $newWho->extensionAttributes['foo1']['value']);
     $this->assertEquals('rab', $newWho->extensionAttributes['foo2']['value']);
 }