Skip to content

Commit 2932d42

Browse files
committed
add missing conformance test fixtures
These four test case were present in the `php-xapi/test-fixtures` package, but didn't have the respective JSON format.
1 parent b29613b commit 2932d42

File tree

6 files changed

+105
-0
lines changed

6 files changed

+105
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
CHANGELOG
22
=========
33

4+
0.2.2
5+
-----
6+
7+
Synchronized the list of statement fixtures with the test cases of the
8+
`php-xapi/test-fixtures` package.
9+
410
0.2.1
511
-----
612

data/Statement/typical_statement.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"id": "12345678-1234-5678-8234-567812345678",
3+
"actor": {
4+
"mbox": "mailto:[email protected]",
5+
"objectType": "Agent"
6+
},
7+
"verb": {
8+
"id": "http://tincanapi.com/conformancetest/verbid",
9+
"display": {
10+
"en-US": "test"
11+
}
12+
},
13+
"object": {
14+
"id": "http://tincanapi.com/conformancetest/activityid",
15+
"objectType": "Activity"
16+
},
17+
"timestamp": "2014-07-23T12:34:02-05:00"
18+
}

data/Statement/voiding_statement.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"id": "12345678-1234-5678-8234-567812345678",
3+
"actor": {
4+
"mbox": "mailto:[email protected]",
5+
"objectType": "Agent"
6+
},
7+
"verb": {
8+
"id": "http://adlnet.gov/expapi/verbs/voided",
9+
"display": {
10+
"en-US": "voided"
11+
}
12+
},
13+
"object": {
14+
"id": "e05aa883-acaf-40ad-bf54-02c8ce485fb0",
15+
"objectType": "StatementRef"
16+
}
17+
}

data/Statement/with_group_actor.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"id": "12345678-1234-5678-8234-567812345678",
3+
"actor": {
4+
"objectType": "Group",
5+
"mbox": "mailto:[email protected]"
6+
},
7+
"verb": {
8+
"id": "http://tincanapi.com/conformancetest/verbid",
9+
"display": {
10+
"en-US": "test"
11+
}
12+
},
13+
"object": {
14+
"id": "http://tincanapi.com/conformancetest/activityid",
15+
"objectType": "Activity"
16+
}
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"id": "12345678-1234-5678-8234-567812345678",
3+
"actor": {
4+
"objectType": "Group",
5+
"mbox": "mailto:[email protected]"
6+
},
7+
"verb": {
8+
"id": "http://tincanapi.com/conformancetest/verbid",
9+
"display": {
10+
"en-US": "test"
11+
}
12+
},
13+
"object": {
14+
"id": "http://tincanapi.com/conformancetest/activityid",
15+
"objectType": "Activity"
16+
}
17+
}

src/StatementJsonFixtures.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,36 @@ public static function getMinimalStatement()
3030
return static::load('minimal_statement');
3131
}
3232

33+
public static function getTypicalStatement()
34+
{
35+
return static::load('typical_statement');
36+
}
37+
38+
public static function getVoidingStatement()
39+
{
40+
return static::load('voiding_statement');
41+
}
42+
43+
/**
44+
* Loads a statement with a group as an actor.
45+
*
46+
* @return string
47+
*/
48+
public static function getStatementWithGroupActor()
49+
{
50+
return static::load('with_group_actor');
51+
}
52+
53+
/**
54+
* Loads a statement with a group that has no members as an actor.
55+
*
56+
* @return string
57+
*/
58+
public static function getStatementWithGroupActorWithoutMembers()
59+
{
60+
return static::load('with_group_actor_without_members');
61+
}
62+
3363
/**
3464
* Loads a statement including a reference to another statement.
3565
*

0 commit comments

Comments
 (0)