/** * @param ModuleEntity $module * @return Entry */ public function addModule(ModuleEntity $module) { $moduleDescription = $module->getDescription(); if (empty($moduleDescription)) { $moduleDescription = 'No description available'; } $moduleName = $module->getName(); $urlParams = ['vendor' => $module->getOwner(), 'module' => $moduleName]; $entry = $this->feed->createEntry(); $entry->setId($module->getIdentifier()); $entry->setTitle($moduleName); $entry->setDescription($moduleDescription); $entry->setLink($this->urlPlugin->fromRoute('view-module', $urlParams, ['force_canonical' => true])); $entry->addAuthor(['name' => $module->getOwner()]); $entry->setDateCreated($module->getCreatedAtDateTime()); $this->feed->addEntry($entry); return $entry; }
public function testSetName() { $name = 'Super Great Happy Good Time Module'; $this->module->setName($name); $this->assertSame($name, $this->module->getName()); }