public function testStringOrNull() { $tag = new Tag(); $tag->setCode(''); $tag->setDescription(''); $tag->setDefaultImage(''); $this->assertSame(null, $tag->getCode()); $this->assertSame(null, $tag->getDescription()); $this->assertSame(null, $tag->getDefaultImage()); }
public static function setFromDTO(Tag &$tag, TagDTO $tagDTO) { $tag->setName($tagDTO->name); $tag->setDefaultImage($tagDTO->defaultImage); $tag->setCode($tagDTO->code); $tag->setDescription($tagDTO->description); $tag->setIsActive($tagDTO->isActive); $tag->setIsVisible($tagDTO->isVisible); $tag->setAreAttachmentsEnabled($tagDTO->areAttachmentsEnabled); $tag->setSortOrder($tagDTO->sortOrder); }
public function getTag() { $tag = new Tag(); $tag->setName('Test Tag'); $tag->setCode('TT' . uniqid()); $tag->setDescription('Test Description'); $tag->setDefaultImage('http://lorempixel.com/400/200/'); $tag->setSortOrder(0); $tag->setIsActive(true); $tag->setIsVisible(true); return $tag; }