Esempio n. 1
0
 public function testSetDescriptionThrowsExceptionOnInvalidParameter()
 {
     $entry = new Writer\Entry();
     try {
         $entry->setDescription('');
         $this->fail();
     } catch (Writer\Exception $e) {
     }
 }
Esempio n. 2
0
 /**
  * Populates a feed entry with data coming from Package objects.
  *
  * @param \Zend\Feed\Writer\Entry $entry
  * @param Package                 $package
  */
 protected function populatePackageData(Entry $entry, Package $package)
 {
     $entry->setTitle($package->getName());
     $entry->setLink($this->generateUrl('view_package', array('name' => $package->getName()), true));
     $entry->setId($package->getName());
     $entry->setDateModified($package->getCreatedAt());
     $entry->setDateCreated($package->getCreatedAt());
     $entry->setDescription($package->getDescription() ?: ' ');
 }