| @@ 169-179 (lines=11) @@ | ||
| 166 | * |
|
| 167 | * @return Statement |
|
| 168 | */ |
|
| 169 | public static function getStatementWithGroupAuthority($id = self::DEFAULT_STATEMENT_ID) |
|
| 170 | { |
|
| 171 | $actor = new Agent('mailto:[email protected]'); |
|
| 172 | $verb = new Verb('http://adlnet.gov/expapi/verbs/created', array('en-US' => 'created')); |
|
| 173 | $activity = new Activity('http://example.adlnet.gov/xapi/example/activity'); |
|
| 174 | $user = new Agent(null, null, null, new Account('oauth_consumer_x75db', 'http://example.com/xAPI/OAuth/Token')); |
|
| 175 | $application = new Agent('mailto:[email protected]'); |
|
| 176 | $authority = new Group(null, null, null, null, null, array($user, $application)); |
|
| 177 | ||
| 178 | return new Statement($id, $actor, $verb, $activity, null, $authority); |
|
| 179 | } |
|
| 180 | ||
| 181 | /** |
|
| 182 | * Loads a void statement. |
|
| @@ 105-115 (lines=11) @@ | ||
| 102 | return new Statement('12345678-1234-5678-8234-567812345678', $actor, $verb, $activity); |
|
| 103 | } |
|
| 104 | ||
| 105 | private function createStatementWithGroupAuthority() |
|
| 106 | { |
|
| 107 | $actor = new Agent('mailto:[email protected]'); |
|
| 108 | $verb = new Verb('http://adlnet.gov/expapi/verbs/created', array('en-US' => 'created')); |
|
| 109 | $activity = new Activity('http://example.adlnet.gov/xapi/example/activity'); |
|
| 110 | $user = new Agent(null, null, null, new Account('oauth_consumer_x75db', 'http://example.com/xAPI/OAuth/Token')); |
|
| 111 | $application = new Agent('mailto:[email protected]'); |
|
| 112 | $authority = new Group(null, null, null, null, null, array($user, $application)); |
|
| 113 | ||
| 114 | return new Statement('12345678-1234-5678-8234-567812345678', $actor, $verb, $activity, null, $authority); |
|
| 115 | } |
|
| 116 | ||
| 117 | private function createAgent() |
|
| 118 | { |
|