public function TaxTypePluginTest::testNoLinesWhenBillingEmpty in Drupal Commerce Connector for AvaTax 8
Assert that the request array doesn't have "lines" when billing is empty.
File
- tests/
src/ Kernel/ TaxTypePluginTest.php, line 173  
Class
- TaxTypePluginTest
 - Tests the tax type plugin.
 
Namespace
Drupal\Tests\commerce_avatax\KernelCode
public function testNoLinesWhenBillingEmpty() {
  $avatax_lib = $this->container
    ->get('commerce_avatax.avatax_lib');
  $this->order
    ->get('billing_profile')
    ->setValue(NULL);
  $this
    ->assertTrue($this->taxType
    ->getPlugin()
    ->applies($this->order));
  $request = $avatax_lib
    ->prepareTransactionsCreate($this->order);
  $this
    ->assertEmpty($request['lines']);
}