Esempio n. 1
0
 public function testUserAnnotationFeed()
 {
     $feed = $this->gdata->getUserAnnotationFeed();
     $this->assertTrue($feed instanceof Books\VolumeFeed);
     foreach ($feed->entries as $entry) {
         $this->assertTrue($entry instanceof Books\VolumeEntry);
         $this->assertEquals($feed->getService(), $entry->getService());
     }
     $entry = new Books\VolumeEntry();
     $entry->setId(new Extension\Id('Mfer_MFwQrkC'));
     $entry->setRating(new \ZendGData\Extension\Rating(3, 1, 5, 1));
     $newEntry = $this->gdata->insertVolume($entry, Books::MY_ANNOTATION_FEED_URI);
     $this->assertTrue($newEntry instanceof Books\VolumeEntry);
     $this->gdata->deleteVolume($newEntry);
 }
Esempio n. 2
0
 /**
  * Delete a Volume
  *
  * @param \ZendGData\Books\VolumeEntry $entry
  * @return void
  */
 public function deleteVolume($entry)
 {
     $entry->delete();
 }
Esempio n. 3
0
 public function testConvertVolumeEntryToAndFromString()
 {
     $this->entry->transferFromXML($this->entryText);
     $entryXml = $this->entry->saveXML();
     $newVolumeEntry = new Books\VolumeEntry();
     $newVolumeEntry->transferFromXML($entryXml);
     $this->verifySamplePropertiesAreCorrect($newVolumeEntry);
     $newVolumeEntryXml = $newVolumeEntry->saveXML();
     $this->assertEquals($entryXml, $newVolumeEntryXml);
 }