/**
  * Loads a statement with a group that has no members as an actor.
  *
  * @param string $id The id of the new Statement
  *
  * @return Statement
  */
 public static function getStatementWithGroupActorWithoutMembers($id = self::DEFAULT_STATEMENT_ID)
 {
     $group = ActorFixtures::getGroupWithoutMembers();
     $verb = VerbFixtures::getVerb();
     $activity = ActivityFixtures::getActivity();
     return new Statement($id, $group, $verb, $activity);
 }
 public function testSerializeGroup()
 {
     $group = ActorFixtures::getGroup();
     $this->assertJsonEquals(ActorJsonFixtures::getGroup(), $this->actorSerializer->serializeActor($group));
 }
예제 #3
0
 public function getObjectsToValidate()
 {
     return array(array(ActorFixtures::getTypicalAgent(), 0));
 }
예제 #4
0
 public function getObjectsToValidate()
 {
     return array(array(new Group(null, null, array(ActorFixtures::getTypicalAgent())), 0, array('anonymous')), array(ActorFixtures::getTypicalGroup(), 0, array('identified')));
 }
 public static function getAllPropertiesSubStatement()
 {
     return new SubStatement(ActorFixtures::getTypicalAgent(), VerbFixtures::getTypicalVerb(), ActivityFixtures::getTypicalActivity(), ResultFixtures::getTypicalResult(), ContextFixtures::getTypicalContext());
 }
예제 #6
0
 public static function getAllPropertiesStatement($id = self::DEFAULT_STATEMENT_ID)
 {
     if (null === $id) {
         $id = UuidFixtures::getUniqueUuid();
     }
     return new Statement(StatementId::fromString($id), ActorFixtures::getTypicalAgent(), VerbFixtures::getTypicalVerb(), ActivityFixtures::getTypicalActivity(), ResultFixtures::getAllPropertiesResult(), ActorFixtures::getAccountAgent(), new \DateTime('2013-05-18T05:32:34+00:00'), new \DateTime('2014-07-23T12:34:02-05:00'), ContextFixtures::getAllPropertiesContext(), array(AttachmentFixtures::getTextAttachment()));
 }
예제 #7
0
 public function getObjectsToValidate()
 {
     return array(array(ActorFixtures::getAnonymousGroup(), 0, array('anonymous')), array(ActorFixtures::getGroup(), 0, array('identified')));
 }
예제 #8
0
 public function getObjectsToValidate()
 {
     return array(array(ActorFixtures::getAgent(), 0), array(new Agent(), 1));
 }
예제 #9
0
 public static function getAllPropertiesContext()
 {
     $context = new Context();
     $context = $context->withRegistration('16fd2706-8baf-433b-82eb-8c7fada847da')->withInstructor(ActorFixtures::getTypicalAgent())->withTeam(ActorFixtures::getTypicalGroup())->withContextActivities(ContextActivitiesFixtures::getAllPropertiesActivities())->withRevision('test')->withPlatform('test')->withLanguage('en-US')->withStatement(StatementReferenceFixtures::getTypicalStatementReference())->withExtensions(ExtensionsFixtures::getTypicalExtensions());
     return $context;
 }