/** * Tests the population of a billing address for the Address Verification Service. */ public function testAddAddressVerificationServiceDetailsWithTssInfo() { $addressLine = "123 Fake St"; $postcode = "WB1 A42"; $country = ""; $expectedBillingCode = "142|123"; $request = new PaymentRequest(); $request->addTssInfo(new TssInfo())->addAddressVerificationServiceDetails($addressLine, $postcode, $country); $addresses = $request->getTssInfo()->getAddresses(); $this->assertEquals($expectedBillingCode, $addresses[0]->getCode()); $this->assertEquals(AddressType::BILLING, $addresses[0]->getType()); $this->assertEquals($country, $addresses[0]->getCountry()); }