You are here

public function TaxTypePluginTest::testCustomerCodeUid in Drupal Commerce Connector for AvaTax 8

Test that the uid is sent as the customerCode when configured to do so.

File

tests/src/Kernel/TaxTypePluginTest.php, line 433

Class

TaxTypePluginTest
Tests the tax type plugin.

Namespace

Drupal\Tests\commerce_avatax\Kernel

Code

public function testCustomerCodeUid() {
  $this
    ->config(self::CONFIG_NAME)
    ->set('customer_code_field', 'uid')
    ->save();
  $avatax_lib = $this->container
    ->get('commerce_avatax.avatax_lib');
  $request_body = $avatax_lib
    ->prepareTransactionsCreate($this->order);
  $this
    ->assertEquals($this->order
    ->getCustomerId(), $request_body['customerCode']);
}