You are here

public function EuropeanUnionVatTest::testGetters in Commerce Core 8.2

@covers ::getLabel @covers ::getCountries @covers ::getExamples @covers ::getFormattedExamples

File

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

Class

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

Namespace

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

Code

public function testGetters() {
  $plugin_definition = $this->plugin
    ->getPluginDefinition();
  $this
    ->assertEquals($plugin_definition['label'], $this->plugin
    ->getLabel());
  $this
    ->assertEquals($plugin_definition['countries'], $this->plugin
    ->getCountries());
  $this
    ->assertEquals([
    'DE123456789',
    'HU12345678',
  ], $this->plugin
    ->getExamples());
  $this
    ->assertEquals('Examples: DE123456789, HU12345678.', $this->plugin
    ->getFormattedExamples());
}