protected function EuropeanUnionVatTest::setUp in Commerce Core 8.2
Same name in this branch
- 8.2 modules/tax/tests/src/Kernel/Plugin/Commerce/TaxType/EuropeanUnionVatTest.php \Drupal\Tests\commerce_tax\Kernel\Plugin\Commerce\TaxType\EuropeanUnionVatTest::setUp()
- 8.2 modules/tax/tests/src/Kernel/Plugin/Commerce/TaxNumberType/EuropeanUnionVatTest.php \Drupal\Tests\commerce_tax\Kernel\Plugin\Commerce\TaxNumberType\EuropeanUnionVatTest::setUp()
Overrides OrderKernelTestBase::setUp
3 calls to EuropeanUnionVatTest::setUp()
- NorwegianVatTest::setUp in modules/
tax/ tests/ src/ Kernel/ Plugin/ Commerce/ TaxType/ NorwegianVatTest.php - SwissVatTest::setUp in modules/
tax/ tests/ src/ Kernel/ Plugin/ Commerce/ TaxType/ SwissVatTest.php - UnitedKingdomVatTest::setUp in modules/
tax/ tests/ src/ Kernel/ Plugin/ Commerce/ TaxType/ UnitedKingdomVatTest.php
3 methods override EuropeanUnionVatTest::setUp()
- NorwegianVatTest::setUp in modules/
tax/ tests/ src/ Kernel/ Plugin/ Commerce/ TaxType/ NorwegianVatTest.php - SwissVatTest::setUp in modules/
tax/ tests/ src/ Kernel/ Plugin/ Commerce/ TaxType/ SwissVatTest.php - UnitedKingdomVatTest::setUp in modules/
tax/ tests/ src/ Kernel/ Plugin/ Commerce/ TaxType/ UnitedKingdomVatTest.php
File
- modules/
tax/ tests/ src/ Kernel/ Plugin/ Commerce/ TaxType/ EuropeanUnionVatTest.php, line 48
Class
- EuropeanUnionVatTest
- @coversDefaultClass \Drupal\commerce_tax\Plugin\Commerce\TaxType\EuropeanUnionVat @group commerce
Namespace
Drupal\Tests\commerce_tax\Kernel\Plugin\Commerce\TaxTypeCode
protected function setUp() : void {
parent::setUp();
$this
->installConfig('commerce_tax');
// Order item types that doesn't need a purchasable entity, for simplicity.
OrderItemType::create([
'id' => 'test_physical',
'label' => 'Test (Physical)',
'orderType' => 'default',
'third_party_settings' => [
'commerce_tax' => [
'taxable_type' => TaxableType::PHYSICAL_GOODS,
],
],
])
->save();
OrderItemType::create([
'id' => 'test_digital',
'label' => 'Test (Digital)',
'orderType' => 'default',
'third_party_settings' => [
'commerce_tax' => [
'taxable_type' => TaxableType::DIGITAL_GOODS,
],
],
])
->save();
$user = $this
->createUser();
$this->user = $this
->reloadEntity($user);
$this->taxType = TaxType::create([
'id' => 'european_union_vat',
'label' => 'EU VAT',
'plugin' => 'european_union_vat',
'configuration' => [
'display_inclusive' => TRUE,
],
// Don't allow the tax type to apply automatically.
'status' => FALSE,
]);
$this->taxType
->save();
}