Ejemplo n.º 1
0
 public function testConvertVideoEntryToAndFromString()
 {
     $this->entry->transferFromXML($this->entryText);
     $entryXml = $this->entry->saveXML();
     $newVideoEntry = new YouTube\VideoEntry();
     $newVideoEntry->transferFromXML($entryXml);
     $this->verifyAllSamplePropertiesAreCorrect($newVideoEntry);
     $newVideoEntryXml = $newVideoEntry->saveXML();
     $this->assertEquals($entryXml, $newVideoEntryXml);
 }
Ejemplo n.º 2
0
 public function testEmptyVideoEntryToAndFromStringShouldMatch()
 {
     $entryXml = $this->entry->saveXML();
     $newVideoEntry = new YouTube\VideoEntry();
     $newVideoEntry->transferFromXML($entryXml);
     $newVideoEntryXml = $newVideoEntry->saveXML();
     $this->assertTrue($entryXml == $newVideoEntryXml);
 }