public function testTokenize() { $client = new Client('EXAMPLE_STORE', 'EXAMPLE_MERCHANT_ID', 'xyz', 'searchkey', '', null, new ClientStub()); $response = $client->tokenize(new TokenizedCard('4000000000000002', new \DateTime('2025-5')), new TokenizedBillingInformation(new Customer('Forenames', 'Surname', 'Mr'), new Address('STREET_ADDRESS_LINE_1', 'STREET_ADDRESS_LINE_2', 'STREET_ADDRESS_LINE_3', 'CITY', 'REGION', 'COUNTRY', '12345'), '*****@*****.**')); $xml = $response->xml(); $this->assertEquals('1', (string) $xml->result); $this->assertEquals('8656000537260002', (string) $xml->token->ref); $this->assertEquals('Visa Credit ending 0002', (string) $xml->token->description); }