Skip to content

Commit a1c8be1

Browse files
committed
Updates tests.
1 parent 2896c86 commit a1c8be1

2 files changed

Lines changed: 26 additions & 91 deletions

File tree

tests/assets/test.json

Lines changed: 26 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,41 @@
11
{
22
"actor": {
3-
"name": "hello",
43
"objectType": "Agent",
5-
"mbox": "mailto:test@example.com"
4+
"mbox": "mailto:duy.nguyen@go1.com.au",
5+
"name": "quanvm"
66
},
77
"verb": {
8-
"id": "http://www.example.com/verbs/test",
9-
"display": {
10-
"en-us": "yo"
11-
}
12-
},
13-
"object": {
14-
"objectType": "SubStatement",
15-
"actor": {
16-
"name": "hello",
17-
"objectType": "Agent",
18-
"mbox": "mailto:test@example.com"
19-
},
20-
"verb": {
21-
"id": "http://www.example.com/verbs/test",
22-
"display": {
23-
"en-us": "yo"
24-
}
25-
},
26-
"object": {
27-
"id": "33616af0-8450-11e4-b4a9-0800200c9a66",
28-
"objectType": "StatementRef"
29-
}
30-
},
31-
"result": {
32-
"score": {
33-
"scaled": 2,
34-
"raw": 1.0,
35-
"min": 1.2,
36-
"max": 1.3
37-
},
38-
"success": true,
39-
"completion": false,
40-
"response": "Hello World",
41-
"duration": "P1DT12H",
42-
"extensions": {
43-
"hello": "world"
44-
}
8+
"id": "http://adlnet.gov/expapi/verbs/experienced",
9+
"display": {"und": "experienced"}
4510
},
4611
"context": {
47-
"registration": "277cb330-8463-11e4-b4a9-0800200c9a66",
48-
"instructor": {
49-
"name": "hello",
50-
"objectType": "Agent",
51-
"mbox": "mailto:test@example.com"
52-
},
53-
"team": {
54-
"name": "hello",
55-
"objectType": "Group",
56-
"mbox": "mailto:test@example.com"
57-
},
58-
"revision": "test",
59-
"platform": "Test",
60-
"language": "en-us",
61-
"statement": {
62-
"id": "609d5570-8463-11e4-b4a9-0800200c9a66"
63-
},
64-
"extensions": {
65-
"hello": "world"
66-
},
6712
"contextActivities": {
68-
"parent": [
69-
{
70-
"id": "http://www.example.com/activities/test"
71-
}
72-
]
13+
"parent": [{
14+
"id": "http://tincanapi.com/GolfExample_TCAPI",
15+
"objectType": "Activity"
16+
}],
17+
"grouping": [{
18+
"id": "http://tincanapi.com/GolfExample_TCAPI",
19+
"objectType": "Activity"
20+
}]
7321
}
7422
},
75-
"authority": {
76-
"objectType": "Group",
77-
"member": [
78-
{
79-
"mbox": "mailto:test@example.com"
80-
},
81-
{
82-
"mbox": "mailto:test@example.com"
83-
}
84-
]
85-
},
86-
"version": "1.0.7002",
87-
"attachments": [
88-
{
89-
"usageType": "http://www.example.com",
90-
"display": {
91-
"en-us": "hello world"
23+
"object": {
24+
"id": "http://tincanapi.com/GolfExample_TCAPI/Playing/Scoring.html",
25+
"objectType": "Activity",
26+
"definition": {
27+
"name": {
28+
"en-US": "Scoring"
9229
},
9330
"description": {
94-
"en-us": "hello world"
31+
"en-US": "An overview of how to score a round of golf."
9532
},
96-
"contentType": "text/plain",
97-
"length": 1,
98-
"sha2": "dgdfgdfg",
99-
"fileUrl": "http://www.example.com"
33+
"type": "http://activitystrea.ms/schema/1.0/badge"
10034
}
101-
],
102-
"timestamp": "2014-12-15T16:29:36+00:00",
103-
"stored": "2014-12-15T16:29:36+00:00",
104-
"id": "825d6150-8477-11e4-b4a9-0800200c9a66"
35+
},
36+
"authority": {
37+
"name": "",
38+
"mbox": "mailto:quan@ll.com",
39+
"objectType": "Agent"
40+
}
10541
}

tests/test.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// Code.
99
$file_location = 'assets/test.json';
1010
$obj = XApi\Statement::createFromJson(file_get_contents($file_location));
11-
1211
// Output.
1312
$errors = $obj->validate();
1413
if (empty($errors)) {

0 commit comments

Comments
 (0)