-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStatementResultFixtures.php
More file actions
61 lines (52 loc) · 1.58 KB
/
StatementResultFixtures.php
File metadata and controls
61 lines (52 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
/*
* This file is part of the xAPI package.
*
* (c) Christian Flothmann <christian.flothmann@xabbuh.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Xabbuh\XApi\DataFixtures;
use Xabbuh\XApi\Model\Agent;
use Xabbuh\XApi\Model\Statement;
use Xabbuh\XApi\Model\StatementResult;
use Xabbuh\XApi\Model\Verb;
/**
* Statement result fixtures.
*
* @author Christian Flothmann <christian.flothmann@xabbuh.de>
*/
class StatementResultFixtures
{
/**
* Loads a statement result.
*
* @param string $urlPath An optional URL path refering to more results
*
* @return StatementResult
*/
public static function getStatementResult($urlPath = null)
{
$statement1 = StatementFixtures::getMinimalStatement();
$verb = new Verb('http://adlnet.gov/expapi/verbs/deleted', array('en-US' => 'deleted'));
$statement2 = new Statement(
'12345678-1234-5678-8234-567812345679',
new Agent('mailto:bob@example.com'),
$verb,
$statement1->getObject()
);
$statementResult = new StatementResult(array($statement1, $statement2), $urlPath);
return $statementResult;
}
/**
* Loads a statement result including a more reference.
*
* @return StatementResult
*/
public static function getStatementResultWithMore()
{
$statementResult = static::getStatementResult('/xapi/statements/more/b381d8eca64a61a42c7b9b4ecc2fabb6');
return $statementResult;
}
}