protected function TaxNumberItemTest::setUp in Commerce Core 8.2
Overrides CommerceKernelTestBase::setUp
File
- modules/
tax/ tests/ src/ Kernel/ TaxNumberItemTest.php, line 44
Class
- TaxNumberItemTest
- Tests the 'commerce_tax_number' field type.
Namespace
Drupal\Tests\commerce_tax\KernelCode
protected function setUp() : void {
parent::setUp();
$field_storage = FieldStorageConfig::create([
'field_name' => 'test_tax_number',
'entity_type' => 'entity_test',
'type' => 'commerce_tax_number',
]);
$field_storage
->save();
$this->field = FieldConfig::create([
'field_name' => 'test_tax_number',
'entity_type' => 'entity_test',
'bundle' => 'entity_test',
'label' => 'VAT Number',
'settings' => [
'countries' => [],
'verify' => TRUE,
'allow_unverified' => TRUE,
],
]);
$this->field
->save();
}