Esempio n. 1
0
 public function testAuthorWithNameEmailToAndFromStringShouldMatch()
 {
     $this->author->name = new Extension\Name('Jeff Scudder');
     $this->author->email = new Extension\Email('*****@*****.**');
     $this->author->uri = new Extension\Uri('http://code.google.com/apis/gdata/');
     $authorXml = $this->author->saveXML();
     $newAuthor = new Extension\Author();
     $newAuthor->transferFromXML($authorXml);
     $newAuthorXml = $newAuthor->saveXML();
     $this->assertTrue($authorXml == $newAuthorXml);
     $this->assertEquals('Jeff Scudder', $newAuthor->name->text);
     $this->assertEquals('*****@*****.**', $newAuthor->email->text);
     $this->assertEquals('http://code.google.com/apis/gdata/', $newAuthor->uri->text);
 }