Skip to content

Commit 58e543b

Browse files
committed
Leverage e2e test result as JSON
1 parent b66022d commit 58e543b

File tree

3 files changed

+310
-33
lines changed

3 files changed

+310
-33
lines changed

test/Unit/Camt054/EndToEndTest.php

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,6 @@ protected function getv8Message(): Message
4040
return (new MessageFormat\V08())->getDecoder()->decode($dom);
4141
}
4242

43-
protected function getv8MessageCredTmHeaderOnly(): Message
44-
{
45-
$dom = new DOMDocument('1.0', 'UTF-8');
46-
$dom->load('test/data/camt054.v8-grphdr-credttm.xml');
47-
48-
return (new MessageFormat\V08())->getDecoder()->decode($dom);
49-
}
50-
51-
protected function getv8MessageCredTmHeaderAndNotification(): Message
52-
{
53-
$dom = new DOMDocument('1.0', 'UTF-8');
54-
$dom->load('test/data/camt054.v8-ntfctn-credttm.xml');
55-
56-
return (new MessageFormat\V08())->getDecoder()->decode($dom);
57-
}
58-
5943
public function testGroupHeader(): void
6044
{
6145
$messages = [
@@ -392,21 +376,4 @@ public function testTransactionDetails(): void
392376
}
393377
}
394378
}
395-
396-
public function testCreditDateInHeaderOnly(): void
397-
{
398-
$message = $this->getv8MessageCredTmHeaderOnly();
399-
400-
self::assertSame('2025-03-25T21:18:34+01:00', $message->getGroupHeader()->getCreatedOn()->format(DATE_ATOM));
401-
self::assertSame('2025-03-25T21:18:34+01:00', $message->getRecords()[0]->getCreatedOn()->format(DATE_ATOM));
402-
}
403-
404-
public function testCreditDateInHeaderAndNotificationOnly(): void
405-
{
406-
$message = $this->getv8MessageCredTmHeaderAndNotification();
407-
408-
self::assertSame('2025-03-25T21:18:34+01:00', $message->getGroupHeader()->getCreatedOn()->format(DATE_ATOM));
409-
$records = $message->getRecords();
410-
self::assertSame('2025-03-25T21:17:59+01:00', $records[0]->getCreatedOn()->format(DATE_ATOM));
411-
}
412379
}
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
{
2+
"__CLASS__": "Genkgo\\Camt\\DTO\\Message",
3+
"getEntries": [
4+
{
5+
"__CLASS__": "Genkgo\\Camt\\DTO\\Entry",
6+
"getAccountServicerReference": null,
7+
"getAdditionalInfo": "",
8+
"getAmount": {
9+
"__CLASS__": "Money\\Money",
10+
"getAmount": "4740",
11+
"getCurrency": {
12+
"__CLASS__": "Money\\Currency",
13+
"getCode": "EUR"
14+
}
15+
},
16+
"getBankTransactionCode": {
17+
"__CLASS__": "Genkgo\\Camt\\DTO\\BankTransactionCode",
18+
"getDomain": {
19+
"__CLASS__": "Genkgo\\Camt\\DTO\\DomainBankTransactionCode",
20+
"getCode": "PMNT",
21+
"getFamily": {
22+
"__CLASS__": "Genkgo\\Camt\\DTO\\DomainFamilyBankTransactionCode",
23+
"getCode": "RRCT",
24+
"getSubFamilyCode": "ESCT"
25+
}
26+
},
27+
"getProprietary": null
28+
},
29+
"getBatchPaymentId": null,
30+
"getBookingDate": null,
31+
"getCharges": null,
32+
"getCreditDebitIndicator": "CRDT",
33+
"getIndex": 0,
34+
"getRecord": {
35+
"__CLASS__": "Genkgo\\Camt\\Camt054\\DTO\\Notification",
36+
"getAccount": {
37+
"__CLASS__": "Genkgo\\Camt\\DTO\\IbanAccount",
38+
"getIban": {
39+
"__CLASS__": "Genkgo\\Camt\\Iban",
40+
"getIban": "DE91100000000123456789"
41+
},
42+
"getIdentification": "DE91100000000123456789",
43+
"getName": null
44+
},
45+
"getAdditionalInformation": null,
46+
"getCopyDuplicateIndicator": null,
47+
"getCreatedOn": {
48+
"__CLASS__": "DateTimeImmutable",
49+
"0": "2025-03-25T20:18:34+00:00"
50+
},
51+
"getElectronicSequenceNumber": null,
52+
"getEntries": [
53+
"__RECURSIVITY__"
54+
],
55+
"getFromDate": null,
56+
"getId": "250326012345678",
57+
"getLegalSequenceNumber": null,
58+
"getPagination": null,
59+
"getToDate": null
60+
},
61+
"getReference": null,
62+
"getReversalIndicator": false,
63+
"getStatus": "INFO",
64+
"getTransactionDetail": {
65+
"__CLASS__": "Genkgo\\Camt\\DTO\\EntryTransactionDetail",
66+
"getAdditionalTransactionInformation": null,
67+
"getAmount": null,
68+
"getAmountDetails": null,
69+
"getBankTransactionCode": {
70+
"__CLASS__": "Genkgo\\Camt\\DTO\\BankTransactionCode",
71+
"getDomain": null,
72+
"getProprietary": null
73+
},
74+
"getCharges": null,
75+
"getCreditDebitIndicator": "CRDT",
76+
"getReference": {
77+
"__CLASS__": "Genkgo\\Camt\\DTO\\Reference",
78+
"getAccountOwnerTransactionId": null,
79+
"getAccountServicerReference": null,
80+
"getAccountServicerTransactionId": null,
81+
"getChequeNumber": null,
82+
"getClearingSystemReference": null,
83+
"getEndToEndId": "NOTPROVIDED",
84+
"getInstructionId": null,
85+
"getMandateId": null,
86+
"getMarketInfrastructureTransactionId": null,
87+
"getMessageId": null,
88+
"getPaymentInformationId": null,
89+
"getProcessingId": null,
90+
"getProprietaries": [],
91+
"getTransactionId": null,
92+
"getUuidEndToEndReference": null
93+
},
94+
"getRelatedAgent": null,
95+
"getRelatedAgents": [],
96+
"getRelatedDates": null,
97+
"getRelatedParties": [
98+
{
99+
"__CLASS__": "Genkgo\\Camt\\DTO\\RelatedParty",
100+
"getAccount": null,
101+
"getRelatedPartyType": {
102+
"__CLASS__": "Genkgo\\Camt\\DTO\\Creditor",
103+
"getAddress": null,
104+
"getIdentification": null,
105+
"getName": "MyBigCompany GmbH"
106+
}
107+
},
108+
{
109+
"__CLASS__": "Genkgo\\Camt\\DTO\\RelatedParty",
110+
"getAccount": {
111+
"__CLASS__": "Genkgo\\Camt\\DTO\\IbanAccount",
112+
"getIban": {
113+
"__CLASS__": "Genkgo\\Camt\\Iban",
114+
"getIban": "DE02200505501015871393"
115+
},
116+
"getIdentification": "DE02200505501015871393",
117+
"getName": null
118+
},
119+
"getRelatedPartyType": {
120+
"__CLASS__": "Genkgo\\Camt\\DTO\\Debtor",
121+
"getAddress": null,
122+
"getIdentification": null,
123+
"getName": "Remote Party"
124+
}
125+
}
126+
],
127+
"getRelatedParty": "__RECURSIVITY__",
128+
"getRemittanceInformation": null,
129+
"getReturnInformation": null
130+
},
131+
"getTransactionDetails": [
132+
"__RECURSIVITY__"
133+
],
134+
"getValueDate": {
135+
"__CLASS__": "DateTimeImmutable",
136+
"0": "2025-03-25T00:00:00+00:00"
137+
}
138+
}
139+
],
140+
"getGroupHeader": {
141+
"__CLASS__": "Genkgo\\Camt\\Camt054\\DTO\\V04\\GroupHeader",
142+
"getAdditionalInformation": null,
143+
"getCreatedOn": {
144+
"__CLASS__": "DateTimeImmutable",
145+
"0": "2025-03-25T20:18:34+00:00"
146+
},
147+
"getMessageId": "COBADEFF250326012345678",
148+
"getMessageRecipient": null,
149+
"getOriginalBusinessQuery": null,
150+
"getPagination": null
151+
},
152+
"getRecords": [
153+
"__RECURSIVITY__"
154+
]
155+
}
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
{
2+
"__CLASS__": "Genkgo\\Camt\\DTO\\Message",
3+
"getEntries": [
4+
{
5+
"__CLASS__": "Genkgo\\Camt\\DTO\\Entry",
6+
"getAccountServicerReference": null,
7+
"getAdditionalInfo": "",
8+
"getAmount": {
9+
"__CLASS__": "Money\\Money",
10+
"getAmount": "4740",
11+
"getCurrency": {
12+
"__CLASS__": "Money\\Currency",
13+
"getCode": "EUR"
14+
}
15+
},
16+
"getBankTransactionCode": {
17+
"__CLASS__": "Genkgo\\Camt\\DTO\\BankTransactionCode",
18+
"getDomain": {
19+
"__CLASS__": "Genkgo\\Camt\\DTO\\DomainBankTransactionCode",
20+
"getCode": "PMNT",
21+
"getFamily": {
22+
"__CLASS__": "Genkgo\\Camt\\DTO\\DomainFamilyBankTransactionCode",
23+
"getCode": "RRCT",
24+
"getSubFamilyCode": "ESCT"
25+
}
26+
},
27+
"getProprietary": null
28+
},
29+
"getBatchPaymentId": null,
30+
"getBookingDate": null,
31+
"getCharges": null,
32+
"getCreditDebitIndicator": "CRDT",
33+
"getIndex": 0,
34+
"getRecord": {
35+
"__CLASS__": "Genkgo\\Camt\\Camt054\\DTO\\Notification",
36+
"getAccount": {
37+
"__CLASS__": "Genkgo\\Camt\\DTO\\IbanAccount",
38+
"getIban": {
39+
"__CLASS__": "Genkgo\\Camt\\Iban",
40+
"getIban": "DE91100000000123456789"
41+
},
42+
"getIdentification": "DE91100000000123456789",
43+
"getName": null
44+
},
45+
"getAdditionalInformation": null,
46+
"getCopyDuplicateIndicator": null,
47+
"getCreatedOn": {
48+
"__CLASS__": "DateTimeImmutable",
49+
"0": "2025-03-25T20:17:59+00:00"
50+
},
51+
"getElectronicSequenceNumber": null,
52+
"getEntries": [
53+
"__RECURSIVITY__"
54+
],
55+
"getFromDate": null,
56+
"getId": "250326012345678",
57+
"getLegalSequenceNumber": null,
58+
"getPagination": null,
59+
"getToDate": null
60+
},
61+
"getReference": null,
62+
"getReversalIndicator": false,
63+
"getStatus": "INFO",
64+
"getTransactionDetail": {
65+
"__CLASS__": "Genkgo\\Camt\\DTO\\EntryTransactionDetail",
66+
"getAdditionalTransactionInformation": null,
67+
"getAmount": null,
68+
"getAmountDetails": null,
69+
"getBankTransactionCode": {
70+
"__CLASS__": "Genkgo\\Camt\\DTO\\BankTransactionCode",
71+
"getDomain": null,
72+
"getProprietary": null
73+
},
74+
"getCharges": null,
75+
"getCreditDebitIndicator": "CRDT",
76+
"getReference": {
77+
"__CLASS__": "Genkgo\\Camt\\DTO\\Reference",
78+
"getAccountOwnerTransactionId": null,
79+
"getAccountServicerReference": null,
80+
"getAccountServicerTransactionId": null,
81+
"getChequeNumber": null,
82+
"getClearingSystemReference": null,
83+
"getEndToEndId": "NOTPROVIDED",
84+
"getInstructionId": null,
85+
"getMandateId": null,
86+
"getMarketInfrastructureTransactionId": null,
87+
"getMessageId": null,
88+
"getPaymentInformationId": null,
89+
"getProcessingId": null,
90+
"getProprietaries": [],
91+
"getTransactionId": null,
92+
"getUuidEndToEndReference": null
93+
},
94+
"getRelatedAgent": null,
95+
"getRelatedAgents": [],
96+
"getRelatedDates": null,
97+
"getRelatedParties": [
98+
{
99+
"__CLASS__": "Genkgo\\Camt\\DTO\\RelatedParty",
100+
"getAccount": null,
101+
"getRelatedPartyType": {
102+
"__CLASS__": "Genkgo\\Camt\\DTO\\Creditor",
103+
"getAddress": null,
104+
"getIdentification": null,
105+
"getName": "MyBigCompany GmbH"
106+
}
107+
},
108+
{
109+
"__CLASS__": "Genkgo\\Camt\\DTO\\RelatedParty",
110+
"getAccount": {
111+
"__CLASS__": "Genkgo\\Camt\\DTO\\IbanAccount",
112+
"getIban": {
113+
"__CLASS__": "Genkgo\\Camt\\Iban",
114+
"getIban": "DE02200505501015871393"
115+
},
116+
"getIdentification": "DE02200505501015871393",
117+
"getName": null
118+
},
119+
"getRelatedPartyType": {
120+
"__CLASS__": "Genkgo\\Camt\\DTO\\Debtor",
121+
"getAddress": null,
122+
"getIdentification": null,
123+
"getName": "Remote Party"
124+
}
125+
}
126+
],
127+
"getRelatedParty": "__RECURSIVITY__",
128+
"getRemittanceInformation": null,
129+
"getReturnInformation": null
130+
},
131+
"getTransactionDetails": [
132+
"__RECURSIVITY__"
133+
],
134+
"getValueDate": {
135+
"__CLASS__": "DateTimeImmutable",
136+
"0": "2025-03-25T00:00:00+00:00"
137+
}
138+
}
139+
],
140+
"getGroupHeader": {
141+
"__CLASS__": "Genkgo\\Camt\\Camt054\\DTO\\V04\\GroupHeader",
142+
"getAdditionalInformation": null,
143+
"getCreatedOn": {
144+
"__CLASS__": "DateTimeImmutable",
145+
"0": "2025-03-25T20:18:34+00:00"
146+
},
147+
"getMessageId": "COBADEFF250326012345678",
148+
"getMessageRecipient": null,
149+
"getOriginalBusinessQuery": null,
150+
"getPagination": null
151+
},
152+
"getRecords": [
153+
"__RECURSIVITY__"
154+
]
155+
}

0 commit comments

Comments
 (0)