Skip to content

Commit 725bea3

Browse files
committed
fix unit tests
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
1 parent e0df954 commit 725bea3

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

tests/Integration/Api/ApiV3Test.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,6 +1117,7 @@ public function dataGetSubmissions() {
11171117
// 'questionId' => Checked dynamically
11181118
'text' => 'Option 1',
11191119
'fileId' => null,
1120+
'questionName' => 'city',
11201121
]
11211122
]
11221123
],
@@ -1137,6 +1138,7 @@ public function dataGetSubmissions() {
11371138
// 'questionId' => Checked dynamically
11381139
'text' => 'Option 2',
11391140
'fileId' => null,
1141+
'questionName' => 'city'
11401142
]
11411143
]
11421144
],
@@ -1384,10 +1386,12 @@ public function testNewSubmission() {
13841386
'questionId' => $this->testForms[0]['questions'][1]['id'],
13851387
'text' => 'Option 1',
13861388
'fileId' => null,
1389+
'questionName' => 'city',
13871390
],
13881391
[
13891392
'questionId' => $this->testForms[0]['questions'][2]['id'],
13901393
'text' => 'test.txt',
1394+
'questionName' => 'file',
13911395
],
13921396
]
13931397
], $data['submissions'][0]);

tests/Unit/Controller/ApiControllerTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public function dataGetSubmissions() {
223223
'submissions' => [
224224
['userId' => 'anon-user-1']
225225
],
226-
'questions' => [['name' => 'questions']],
226+
'questions' => [['id' => 1, 'name' => 'questions']],
227227
'expected' => [
228228
'submissions' => [
229229
[
@@ -233,6 +233,7 @@ public function dataGetSubmissions() {
233233
],
234234
'questions' => [
235235
[
236+
'id' => 1,
236237
'name' => 'questions',
237238
'extraSettings' => new \stdClass(),
238239
],
@@ -244,7 +245,7 @@ public function dataGetSubmissions() {
244245
'submissions' => [
245246
['userId' => 'jdoe']
246247
],
247-
'questions' => [['name' => 'questions']],
248+
'questions' => [['id' => 1, 'name' => 'questions']],
248249
'expected' => [
249250
'submissions' => [
250251
[
@@ -254,6 +255,7 @@ public function dataGetSubmissions() {
254255
],
255256
'questions' => [
256257
[
258+
'id' => 1,
257259
'name' => 'questions',
258260
'extraSettings' => new \stdClass(),
259261
],

0 commit comments

Comments
 (0)