示例#1
0
 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());
 }
示例#2
0
 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);
 }
示例#3
0
 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;
 }