Beispiel #1
0
 public function __construct(TagObjectBuilder $builder)
 {
     parent::__construct($builder->getObjectID(), $builder->getTargetID());
     $this->author = $builder->getAuthor();
     $this->tag = $builder->getTag();
     $this->datePublished = $builder->getDatePublished();
     $this->signature = $builder->getSignature();
 }
Beispiel #2
0
 public function testTag()
 {
     $tag = (new TagObjectBuilder())->objectID(UOID::createUOID())->targetID(UOID::createUOID())->author(Sonic::getContextGlobalID())->datePublished()->tag($this->bobSocialRecord->getGlobalID())->build();
     $this->assertTrue($tag->validate());
     $this->assertEquals($tag, TagObjectBuilder::buildFromJSON($tag->getJSONString()));
 }