Beispiel #1
0
 public function testGetTitleReturnsNullIfDateNotSet()
 {
     $entry = new Writer\Entry();
     $this->assertTrue(is_null($entry->getTitle()));
 }
 /**
  * Populates a feed entry with data coming from Version objects.
  *
  * @param \Zend\Feed\Writer\Entry $entry
  * @param Version                 $version
  */
 protected function populateVersionData(Entry $entry, Version $version)
 {
     $entry->setTitle($entry->getTitle() . " ({$version->getVersion()})");
     $entry->setId($entry->getId() . ' ' . $version->getVersion());
     $entry->setDateModified($version->getReleasedAt());
     $entry->setDateCreated($version->getReleasedAt());
     foreach ($version->getAuthors() as $author) {
         /** @var $author \Packagist\WebBundle\Entity\Author */
         if ($author->getName()) {
             $entry->addAuthor(array('name' => $author->getName()));
         }
     }
 }