Skip to content

Commit 8b7b0fa

Browse files
committed
fix tests
1 parent 4441f60 commit 8b7b0fa

File tree

13 files changed

+271
-83
lines changed

13 files changed

+271
-83
lines changed

src/Service/Action/Committer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function commit(int $actionId, ?string $config, UserContext $context): vo
5252
$row = new Table\Generated\ActionCommitRow();
5353
$row->setActionId($actionId);
5454
$row->setUserId($context->getUserId());
55-
$row->setPrevHash($previousHash);
55+
$row->setPrevHash($previousHash ?? '');
5656
$row->setCommitHash($hash);
5757
$row->setConfig($config);
5858
$row->setInsertDate($now);

src/Service/Schema/Committer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function commit(int $schemaId, string $source, UserContext $context): voi
4848
$row = new Table\Generated\SchemaCommitRow();
4949
$row->setSchemaId($schemaId);
5050
$row->setUserId($context->getUserId());
51-
$row->setPrevHash($previousHash);
51+
$row->setPrevHash($previousHash ?? '');
5252
$row->setCommitHash($hash);
5353
$row->setSource($source);
5454
$row->setInsertDate($now);

tests/Backend/Api/Backup/resource/export.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@
367367
{
368368
"id": 4,
369369
"rateId": 4,
370-
"operationId": 257,
370+
"operationId": 259,
371371
"authenticated": true
372372
}
373373
]
@@ -384,7 +384,7 @@
384384
{
385385
"id": 3,
386386
"rateId": 3,
387-
"operationId": 256
387+
"operationId": 258
388388
}
389389
]
390390
},

tests/Backend/Api/Form/CollectionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function testGet()
5050
"id": 1,
5151
"status": 1,
5252
"name": "my_form",
53-
"operationId": 257,
53+
"operationId": 259,
5454
"metadata": {
5555
"foo": "bar"
5656
}

tests/Backend/Api/Form/EntityTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function testGet()
5454
"id": 1,
5555
"status": 1,
5656
"name": "my_form",
57-
"operationId": 257,
57+
"operationId": 259,
5858
"uiSchema": {
5959
"foo": "bar"
6060
},
@@ -81,7 +81,7 @@ public function testGetByName()
8181
"id": 1,
8282
"status": 1,
8383
"name": "my_form",
84-
"operationId": 257,
84+
"operationId": 259,
8585
"uiSchema": {
8686
"foo": "bar"
8787
},

tests/Backend/Api/Log/EntityTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function testGet()
4444
{
4545
"id": 1,
4646
"appId": 3,
47-
"operationId": 256,
47+
"operationId": 258,
4848
"ip": "127.0.0.1",
4949
"userAgent": "Mozilla\/5.0 (Windows NT 6.3; WOW64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/43.0.2357.130 Safari\/537.36",
5050
"method": "GET",

tests/Backend/Api/Operation/CollectionTest.php

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function testGet()
4949
"itemsPerPage": 16,
5050
"entry": [
5151
{
52-
"id": 268,
52+
"id": 270,
5353
"status": 1,
5454
"active": true,
5555
"public": false,
@@ -61,7 +61,7 @@ public function testGet()
6161
"action": "action:\/\/MIME-Action"
6262
},
6363
{
64-
"id": 267,
64+
"id": 269,
6565
"status": 1,
6666
"active": true,
6767
"public": false,
@@ -73,7 +73,7 @@ public function testGet()
7373
"action": "action:\/\/MIME-Action"
7474
},
7575
{
76-
"id": 266,
76+
"id": 268,
7777
"status": 1,
7878
"active": true,
7979
"public": false,
@@ -85,7 +85,7 @@ public function testGet()
8585
"action": "action:\/\/MIME-Action"
8686
},
8787
{
88-
"id": 265,
88+
"id": 267,
8989
"status": 1,
9090
"active": true,
9191
"public": false,
@@ -97,7 +97,7 @@ public function testGet()
9797
"action": "action:\/\/MIME-Action"
9898
},
9999
{
100-
"id": 264,
100+
"id": 266,
101101
"status": 1,
102102
"active": true,
103103
"public": false,
@@ -109,7 +109,7 @@ public function testGet()
109109
"action": "action:\/\/MIME-Action"
110110
},
111111
{
112-
"id": 263,
112+
"id": 265,
113113
"status": 1,
114114
"active": true,
115115
"public": false,
@@ -121,7 +121,7 @@ public function testGet()
121121
"action": "action:\/\/MIME-Action"
122122
},
123123
{
124-
"id": 262,
124+
"id": 264,
125125
"status": 1,
126126
"active": true,
127127
"public": false,
@@ -133,7 +133,7 @@ public function testGet()
133133
"action": "action:\/\/Inspect-Action"
134134
},
135135
{
136-
"id": 261,
136+
"id": 263,
137137
"status": 1,
138138
"active": true,
139139
"public": false,
@@ -145,7 +145,7 @@ public function testGet()
145145
"action": "action:\/\/Inspect-Action"
146146
},
147147
{
148-
"id": 260,
148+
"id": 262,
149149
"status": 1,
150150
"active": true,
151151
"public": false,
@@ -157,7 +157,7 @@ public function testGet()
157157
"action": "action:\/\/Inspect-Action"
158158
},
159159
{
160-
"id": 259,
160+
"id": 261,
161161
"status": 1,
162162
"active": true,
163163
"public": false,
@@ -169,7 +169,7 @@ public function testGet()
169169
"action": "action:\/\/Inspect-Action"
170170
},
171171
{
172-
"id": 258,
172+
"id": 260,
173173
"status": 1,
174174
"active": true,
175175
"public": false,
@@ -181,7 +181,7 @@ public function testGet()
181181
"action": "action:\/\/Inspect-Action"
182182
},
183183
{
184-
"id": 257,
184+
"id": 259,
185185
"status": 1,
186186
"active": true,
187187
"public": false,
@@ -193,7 +193,7 @@ public function testGet()
193193
"action": "action:\/\/Sql-Insert"
194194
},
195195
{
196-
"id": 256,
196+
"id": 258,
197197
"status": 1,
198198
"active": true,
199199
"public": true,
@@ -239,7 +239,7 @@ public function testGetSearch()
239239
"itemsPerPage": 16,
240240
"entry": [
241241
{
242-
"id": 262,
242+
"id": 264,
243243
"status": 1,
244244
"active": true,
245245
"public": false,
@@ -251,7 +251,7 @@ public function testGetSearch()
251251
"action": "action:\/\/Inspect-Action"
252252
},
253253
{
254-
"id": 261,
254+
"id": 263,
255255
"status": 1,
256256
"active": true,
257257
"public": false,
@@ -263,7 +263,7 @@ public function testGetSearch()
263263
"action": "action:\/\/Inspect-Action"
264264
},
265265
{
266-
"id": 260,
266+
"id": 262,
267267
"status": 1,
268268
"active": true,
269269
"public": false,
@@ -275,7 +275,7 @@ public function testGetSearch()
275275
"action": "action:\/\/Inspect-Action"
276276
},
277277
{
278-
"id": 259,
278+
"id": 261,
279279
"status": 1,
280280
"active": true,
281281
"public": false,
@@ -287,7 +287,7 @@ public function testGetSearch()
287287
"action": "action:\/\/Inspect-Action"
288288
},
289289
{
290-
"id": 258,
290+
"id": 260,
291291
"status": 1,
292292
"active": true,
293293
"public": false,
@@ -321,7 +321,7 @@ public function testGetCount()
321321
"itemsPerPage": 80,
322322
"entry": [
323323
{
324-
"id": 268,
324+
"id": 270,
325325
"status": 1,
326326
"active": true,
327327
"public": false,
@@ -333,7 +333,7 @@ public function testGetCount()
333333
"action": "action:\/\/MIME-Action"
334334
},
335335
{
336-
"id": 267,
336+
"id": 269,
337337
"status": 1,
338338
"active": true,
339339
"public": false,
@@ -345,7 +345,7 @@ public function testGetCount()
345345
"action": "action:\/\/MIME-Action"
346346
},
347347
{
348-
"id": 266,
348+
"id": 268,
349349
"status": 1,
350350
"active": true,
351351
"public": false,
@@ -357,7 +357,7 @@ public function testGetCount()
357357
"action": "action:\/\/MIME-Action"
358358
},
359359
{
360-
"id": 265,
360+
"id": 267,
361361
"status": 1,
362362
"active": true,
363363
"public": false,
@@ -369,7 +369,7 @@ public function testGetCount()
369369
"action": "action:\/\/MIME-Action"
370370
},
371371
{
372-
"id": 264,
372+
"id": 266,
373373
"status": 1,
374374
"active": true,
375375
"public": false,
@@ -381,7 +381,7 @@ public function testGetCount()
381381
"action": "action:\/\/MIME-Action"
382382
},
383383
{
384-
"id": 263,
384+
"id": 265,
385385
"status": 1,
386386
"active": true,
387387
"public": false,
@@ -393,7 +393,7 @@ public function testGetCount()
393393
"action": "action:\/\/MIME-Action"
394394
},
395395
{
396-
"id": 262,
396+
"id": 264,
397397
"status": 1,
398398
"active": true,
399399
"public": false,
@@ -405,7 +405,7 @@ public function testGetCount()
405405
"action": "action:\/\/Inspect-Action"
406406
},
407407
{
408-
"id": 261,
408+
"id": 263,
409409
"status": 1,
410410
"active": true,
411411
"public": false,
@@ -417,7 +417,7 @@ public function testGetCount()
417417
"action": "action:\/\/Inspect-Action"
418418
},
419419
{
420-
"id": 260,
420+
"id": 262,
421421
"status": 1,
422422
"active": true,
423423
"public": false,
@@ -429,7 +429,7 @@ public function testGetCount()
429429
"action": "action:\/\/Inspect-Action"
430430
},
431431
{
432-
"id": 259,
432+
"id": 261,
433433
"status": 1,
434434
"active": true,
435435
"public": false,
@@ -441,7 +441,7 @@ public function testGetCount()
441441
"action": "action:\/\/Inspect-Action"
442442
},
443443
{
444-
"id": 258,
444+
"id": 260,
445445
"status": 1,
446446
"active": true,
447447
"public": false,
@@ -453,7 +453,7 @@ public function testGetCount()
453453
"action": "action:\/\/Inspect-Action"
454454
},
455455
{
456-
"id": 257,
456+
"id": 259,
457457
"status": 1,
458458
"active": true,
459459
"public": false,
@@ -465,7 +465,7 @@ public function testGetCount()
465465
"action": "action:\/\/Sql-Insert"
466466
},
467467
{
468-
"id": 256,
468+
"id": 258,
469469
"status": 1,
470470
"active": true,
471471
"public": true,
@@ -534,7 +534,7 @@ public function testPost()
534534
{
535535
"success": true,
536536
"message": "Operation successfully created",
537-
"id": "269"
537+
"id": "271"
538538
}
539539
JSON;
540540

@@ -584,7 +584,7 @@ public function testPostWithScheme()
584584
$this->assertEquals(201, $response->getStatusCode(), $body);
585585
$this->assertSame(true, $data->success);
586586
$this->assertSame('Operation successfully created', $data->message);
587-
$this->assertContains($data->id, ['269', '270']); // postgres does not reset the auto increment so we need to check both
587+
$this->assertContains($data->id, ['271', '272']); // postgres does not reset the auto increment so we need to check both
588588

589589
// check database
590590
Assert::assertOperation($this->connection, OperationInterface::STABILITY_EXPERIMENTAL, 'test.bar', 'GET', '/foo/bar', 200, ['foo', 'baz'], $metadata);

0 commit comments

Comments
 (0)