Skip to content

Commit d30965b

Browse files
committed
MC-21491: Pricing :: FPT display settings
- fix test
1 parent 9f64ae6 commit d30965b

File tree

1 file changed

+1
-65
lines changed

1 file changed

+1
-65
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Weee/ProductPriceWithFPTTest.php

Lines changed: 1 addition & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,6 @@ class ProductPriceWithFPTTest extends GraphQlAbstract
3333
/** @var ScopeConfigInterface */
3434
private $scopeConfig;
3535

36-
37-
/** @var \Magento\Tax\Model\Calculation\Rate[] */
38-
private $fixtureTaxRates;
39-
40-
/** @var \Magento\Tax\Model\Calculation\Rule[] */
41-
private $fixtureTaxRules;
42-
4336
/**
4437
* @inheritdoc
4538
*/
@@ -59,20 +52,6 @@ protected function setUp(): void
5952
'tax/calculation/price_includes_tax'
6053
];
6154

62-
63-
$this->getFixtureTaxRates();
64-
$this->getFixtureTaxRules();
65-
$taxRules = $this->getFixtureTaxRules();
66-
if (count($taxRules)) {
67-
$taxRates = $this->getFixtureTaxRates();
68-
foreach ($taxRules as $taxRule) {
69-
$taxRule->delete();
70-
}
71-
foreach ($taxRates as $taxRate) {
72-
$taxRate->delete();
73-
}
74-
}
75-
7655
foreach ($currentSettingsArray as $configPath) {
7756
$this->initialConfig[$configPath] = $this->scopeConfig->getValue(
7857
$configPath
@@ -546,7 +525,7 @@ public function catalogPriceIncTaxCatalogDisplayInclTaxInclFPTWithDescrWithTaxAp
546525
return [
547526
[
548527
'weeTaxSettings' => [
549-
'tax/calculation/price_includes_tax' > '1',
528+
'tax/calculation/price_includes_tax' => '1',
550529
'tax/display/type' => '2',
551530
'tax/weee/enable' => '1',
552531
'tax/weee/display' => '0',
@@ -762,47 +741,4 @@ private function getProductQuery(array $skus): string
762741
}
763742
QUERY;
764743
}
765-
766-
/**
767-
* Get tax rates created in Magento\Tax\_files\tax_rule_region_1_al.php
768-
*
769-
* @return \Magento\Tax\Model\Calculation\Rate[]
770-
*/
771-
private function getFixtureTaxRates()
772-
{
773-
if ($this->fixtureTaxRates === null) {
774-
$this->fixtureTaxRates = [];
775-
if ($this->getFixtureTaxRules()) {
776-
$taxRateIds = (array)$this->getFixtureTaxRules()[0]->getRates();
777-
foreach ($taxRateIds as $taxRateId) {
778-
/** @var \Magento\Tax\Model\Calculation\Rate $taxRate */
779-
$taxRate = Bootstrap::getObjectManager()->create(\Magento\Tax\Model\Calculation\Rate::class);
780-
$this->fixtureTaxRates[] = $taxRate->load($taxRateId);
781-
}
782-
}
783-
}
784-
return $this->fixtureTaxRates;
785-
}
786-
787-
/**
788-
* Get tax rule created in Magento\Tax\_files\tax_rule_region_1_al.php
789-
*
790-
* @return \Magento\Tax\Model\Calculation\Rule[]
791-
*/
792-
private function getFixtureTaxRules()
793-
{
794-
if ($this->fixtureTaxRules === null) {
795-
$this->fixtureTaxRules = [];
796-
$taxRuleCodes = ['AL Test Rule'];
797-
foreach ($taxRuleCodes as $taxRuleCode) {
798-
/** @var \Magento\Tax\Model\Calculation\Rule $taxRule */
799-
$taxRule = Bootstrap::getObjectManager()->create(\Magento\Tax\Model\Calculation\Rule::class);
800-
$taxRule->load($taxRuleCode, 'code');
801-
if ($taxRule->getId()) {
802-
$this->fixtureTaxRules[] = $taxRule;
803-
}
804-
}
805-
}
806-
return $this->fixtureTaxRules;
807-
}
808744
}

0 commit comments

Comments
 (0)