@@ -73,6 +73,7 @@ public function test_payments_routing(): void
7373 ->setPaymentId ('mypaymentid ' );
7474 $ api ->call ();
7575
76+ $ this ->assertInstanceOf (Request::class, $ api ->getRawRequest ());
7677 $ this ->assertInstanceOf (Response::class, $ api ->getRawResponse ());
7778
7879 $ this ->assertSame ($ this ->getExceptedUri ('payments/ ' ), $ api ->getRawRequest ()->getUri ()->getPath ());
@@ -119,6 +120,7 @@ public function test_multiple_payment_transaction_count(): void
119120 public function test_multiple_payment_transaction_data (): void
120121 {
121122 $ data = $ this ->getMultiplePaymentTransaction ()[0 ];
123+ $ this ->assertInstanceOf (Transaction::class, $ data );
122124
123125 $ this ->assertSame ('1 ' , $ data ->TransactionId );
124126 $ this ->assertSame ('ccc1479c-37f9-4962-8d2c-662d75117e9d ' , $ data ->PaymentId );
@@ -142,16 +144,24 @@ public function test_multiple_payment_transaction_data(): void
142144 $ this ->assertSame (1.00 , $ data ->CapturedAmount );
143145 $ this ->assertSame (0.0 , $ data ->RefundedAmount );
144146 $ this ->assertSame (0.0 , $ data ->RecurringDefaultAmount );
147+ $ this ->assertInstanceOf (\DateTime::class, $ data ->CreatedDate );
148+ $ this ->assertInstanceOf (\DateTime::class, $ data ->UpdatedDate );
145149 $ this ->assertSame ('28-09-2010 ' , $ data ->CreatedDate ->format ('d-m-Y ' ));
146150 $ this ->assertSame ('28-09-2010 ' , $ data ->UpdatedDate ->format ('d-m-Y ' ));
147151 $ this ->assertSame ('CreditCard ' , $ data ->PaymentNature );
148152 $ this ->assertSame ('eCommerce ' , $ data ->PaymentSource );
149153 $ this ->assertSame (13.37 , $ data ->FraudRiskScore );
150154 $ this ->assertSame ('Fraud detection explanation ' , $ data ->FraudExplanation );
151155
156+ // Payment nature service
157+ $ this ->assertInstanceOf (PaymentNatureService::class, $ data ->PaymentNatureService );
158+
152159 // Payment Infos
153160 $ this ->assertCount (3 , $ data ->PaymentInfos );
154161
162+ // Customer info
163+ $ this ->assertInstanceOf (CustomerInfo::class, $ data ->CustomerInfo );
164+
155165 // ReconciliationIdentifiers
156166 $ this ->assertCount (1 , $ data ->ReconciliationIdentifiers );
157167 }
@@ -162,6 +172,7 @@ public function test_multiple_payment_transaction_data(): void
162172 public function test_multiple_payment_paymentnatureservice_data (): void
163173 {
164174 $ data = $ this ->getMultiplePaymentTransaction ()[0 ]->PaymentNatureService ;
175+ $ this ->assertInstanceOf (PaymentNatureService::class, $ data );
165176
166177 $ this ->assertSame ('TestAcquirer ' , $ data ->name );
167178 $ this ->assertTrue ($ data ->SupportsRefunds );
@@ -223,26 +234,36 @@ public function test_multiple_payment_customerinfo_data(): void
223234 $ this ->assertSame ('support ' , $ data ->Username );
224235 $ this ->assertSame ('+45 7020 0056 ' , $ data ->CustomerPhone );
225236 $ this ->assertSame ('12345678 ' , $ data ->OrganisationNumber );
237+ $ this ->assertInstanceOf (Country::class, $ data ->CountryOfOrigin );
226238
227239 $ country = $ data ->CountryOfOrigin ;
240+ $ this ->assertInstanceOf (Country::class, $ country );
228241 $ this ->assertSame ('DK ' , $ country ->Country );
229242 $ this ->assertSame ('BillingAddress ' , $ country ->Source );
230243
244+ $ this ->assertInstanceOf (Address::class, $ data ->BillingAddress );
245+
231246 $ address = $ data ->BillingAddress ;
247+ $ this ->assertInstanceOf (Address::class, $ address );
232248 $ this ->assertSame ('Palle ' , $ address ->Firstname );
233249 $ this ->assertSame ('Simonsen ' , $ address ->Lastname );
234250 $ this ->assertSame ('Rosenkæret 13 ' , $ address ->Address );
235251 $ this ->assertSame ('Søborg ' , $ address ->City );
236252 $ this ->assertSame ('2860 ' , $ address ->PostalCode );
237253 $ this ->assertSame ('DK ' , $ address ->Country );
238254
255+ $ this ->assertInstanceOf (Address::class, $ data ->ShippingAddress );
256+
239257 $ address = $ data ->ShippingAddress ;
258+ $ this ->assertInstanceOf (Address::class, $ address );
240259 $ this ->assertNull ($ address ->Firstname );
241260 $ this ->assertNull ($ address ->Lastname );
242261 $ this ->assertNull ($ address ->Address );
243262 $ this ->assertNull ($ address ->City );
244263 $ this ->assertNull ($ address ->PostalCode );
245264 $ this ->assertNull ($ address ->Country );
265+
266+ $ this ->assertInstanceOf (Address::class, $ data ->RegisteredAddress );
246267 }
247268
248269 /**
@@ -251,10 +272,12 @@ public function test_multiple_payment_customerinfo_data(): void
251272 public function test_multiple_payment_reconciliationidentifiers_data (): void
252273 {
253274 $ data = $ this ->getMultiplePaymentTransaction ()[0 ]->ReconciliationIdentifiers [0 ];
275+ $ this ->assertInstanceOf (ReconciliationIdentifier::class, $ data );
254276
255277 $ this ->assertSame ('f4e2533e-c578-4383-b075-bc8a6866784a ' , $ data ->Id );
256278 $ this ->assertSame (1.00 , $ data ->Amount );
257279 $ this ->assertSame ('captured ' , $ data ->Type );
280+ $ this ->assertInstanceOf (\DateTime::class, $ data ->Date );
258281 $ this ->assertSame ('28-09-2010 ' , $ data ->Date ->format ('d-m-Y ' ));
259282 $ this ->assertSame ('978 ' , $ data ->currency );
260283 }
0 commit comments