Exemplo n.º 1
0
 public function testEmptyPlaylistListFeedToAndFromStringShouldMatchV2()
 {
     $this->feed->setMajorProtocolVersion(2);
     $this->feed->transferFromXML($this->V2feedText);
     $feedXml = $this->feed->saveXML();
     $newPlaylistListFeed = new YouTube\PlaylistListFeed();
     $newPlaylistListFeed->transferFromXML($feedXml);
     $newPlaylistListFeed->setMajorProtocolVersion(2);
     $newPlaylistListFeedXml = $newPlaylistListFeed->saveXML();
     $this->assertTrue($feedXml == $newPlaylistListFeedXml);
 }
Exemplo n.º 2
0
 public function testConvertPlaylistListFeedToAndFromString()
 {
     $this->feed->transferFromXML($this->feedText);
     $entryXml = $this->feed->saveXML();
     $newPlaylistListFeed = new YouTube\PlaylistListFeed();
     $newPlaylistListFeed->transferFromXML($entryXml);
     $this->verifyAllSamplePropertiesAreCorrect($newPlaylistListFeed);
     $newPlaylistListFeedXml = $newPlaylistListFeed->saveXML();
     $this->assertEquals($entryXml, $newPlaylistListFeedXml);
 }