public function AddressValidationTest::testResolveAddress in Drupal Commerce Connector for AvaTax 8
@covers \Drupal\commerce_avatax\AvataxLib::resolveAddress @dataProvider addressesData
File
- tests/
src/ Kernel/ AddressValidationTest.php, line 45
Class
- AddressValidationTest
- Tests address resolving and validation.
Namespace
Drupal\Tests\commerce_avatax\KernelCode
public function testResolveAddress(array $address, string $fixture) {
$sut = $this
->createMockedAvataxLib($fixture);
$result = $sut
->resolveAddress($address);
$this
->assertEquals($address, AvataxLib::formatDrupalAddress($result['address']));
// Run again to verify ::shouldBeCalledOnce and request caching.
$sut
->resolveAddress($address);
}