public function testGetVoidStatement() { $statement = new Statement(); $statement->setId('e05aa883-acaf-40ad-bf54-02c8ce485fb0'); $actor = new Agent(); $actor->setMbox('mailto:edoardo.biraghi@gmail.com'); $voidStatement = $statement->getVoidStatement($actor); /** @var \XApi\Model\StatementReferenceInterface $statementReference */ $statementReference = $voidStatement->getObject(); $this->assertEquals($actor, $voidStatement->getActor()); $this->assertTrue($voidStatement->getVerb()->isVoidVerb()); $this->assertInstanceOf('\\XApi\\Model\\StatementReferenceInterface', $statementReference); $this->assertEquals('e05aa883-acaf-40ad-bf54-02c8ce485fb0', $statementReference->getStatementId()); }
// print_r($statement); $serializedStatements = $statementSerializer->serializeStatement($statement); $deserialized = \json_decode($serializedStatements, true); $client->addEvent('app_project', $deserialized); print "\nCreated " . $i . " events"; } */ $statement = new Statement(); $actor = new Agent(); $actor->setName($data['agent']['name']); // $verb = Verb::create('commented'); $verb = new Verb(); $verb->setId($data['verb']['id']); $verb->setDisplay($data['verb']['display']); $object = new Activity(); $object->setId($data['object']['id']); $on = new Activity(); $on->setId($data['object']['id']); $context = new Context(); $context->setInstructor($actor); $ca = new ContextActivities(); $ca->setParent($on); $context->setContextActivities($ca); $statement->setId(Uuid::uuid4());