/**
  * Loads a void statement.
  *
  * @param string $id The id of the new Statement
  *
  * @return Statement
  */
 public static function getVoidStatement($id = self::DEFAULT_STATEMENT_ID)
 {
     $actor = new Agent('mailto:xapi@adlnet.gov');
     $verb = Verb::createVoidVerb();
     $object = new StatementReference('e05aa883-acaf-40ad-bf54-02c8ce485fb0');
     return new Statement($id, $actor, $verb, $object);
 }
 public function testVoidStatement()
 {
     $voidedStatementId = '12345678-1234-5678-1234-567812345679';
     $voidingStatementId = '12345678-1234-5678-1234-567812345678';
     $agent = new Agent('mailto:john.doe@example.com');
     $statementReference = new StatementReference($voidedStatementId);
     $voidingStatement = new Statement(null, $agent, Verb::createVoidVerb(), $statementReference);
     $voidedStatement = $this->createStatement($voidedStatementId);
     $this->validateStoreApiCall('post', 'statements', array(), 200, '["' . $voidingStatementId . '"]', $voidingStatement);
     $returnedVoidingStatement = $this->client->voidStatement($voidedStatement, $agent);
     $expectedVoidingStatement = new Statement($voidingStatementId, $agent, Verb::createVoidVerb(), $statementReference);
     $this->assertEquals($expectedVoidingStatement, $returnedVoidingStatement);
 }
Example #3
0
 public function testCreateVoidVerb()
 {
     $this->assertEquals('http://adlnet.gov/expapi/verbs/voided', Verb::createVoidVerb()->getId());
 }