You are here

public function EuropeanUnionVatTest::testCanonicalize in Commerce Core 8.2

@covers ::canonicalize

File

modules/tax/tests/src/Kernel/Plugin/Commerce/TaxNumberType/EuropeanUnionVatTest.php, line 58

Class

EuropeanUnionVatTest
@coversDefaultClass \Drupal\commerce_tax\Plugin\Commerce\TaxNumberType\EuropeanUnionVat @group commerce

Namespace

Drupal\Tests\commerce_tax\Kernel\Plugin\Commerce\TaxNumberType

Code

public function testCanonicalize() {

  // Confirm that spaces, dots, and dashes are removed by default.
  $this
    ->assertEquals('DE123456789', $this->plugin
    ->canonicalize('DE 123456789'));
  $this
    ->assertEquals('FR00123456789', $this->plugin
    ->canonicalize('FR 00.123-456-789'));
}