public function testSetDateModifiedThrowsExceptionOnInvalidParameter() { $entry = new Writer\Entry(); try { $entry->setDateModified('abc'); $this->fail(); } catch (Writer\Exception $e) { } }
/** * 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())); } } }