Skip to content

Commit e23b7b1

Browse files
author
Robert He
committed
Merge branch 'FearlessKiwis-MAGETWO-31371-test_coverage' of https://github.corp.ebay.com/magento-fearless-kiwis/magento2ce into develop
2 parents d95424a + 441685f commit e23b7b1

File tree

11 files changed

+305
-108
lines changed

11 files changed

+305
-108
lines changed

app/code/Magento/GoogleShopping/Model/Attribute/Tax.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ public function convertAttribute($product, $entry)
171171
foreach ($regions as $region) {
172172
$adjustments = $product->getPriceInfo()->getAdjustments();
173173
if (array_key_exists('tax', $adjustments)) {
174-
$taxIncluded = true;
174+
$isTaxIncluded = true;
175175
} else {
176-
$taxIncluded = false;
176+
$isTaxIncluded = false;
177177
}
178178

179179
$quoteDetailsItemDataArray = [
@@ -185,7 +185,7 @@ public function convertAttribute($product, $entry)
185185
],
186186
'unit_price' => $product->getPrice(),
187187
'quantity' => 1,
188-
'tax_included' => $taxIncluded,
188+
'is_tax_included' => $isTaxIncluded,
189189
'short_description' => $product->getName(),
190190
];
191191

app/code/Magento/GoogleShopping/Test/Unit/Model/Attribute/TaxTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public function testConvertAttribute()
192192
],
193193
'unit_price' => $price,
194194
'quantity' => 1,
195-
'tax_included' => 1,
195+
'is_tax_included' => 1,
196196
'short_description' => $name,
197197
],
198198
],

app/code/Magento/Tax/Api/Data/QuoteDetailsItemInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function setQuantity($quantity);
8888
* @return bool
8989
* @SuppressWarnings(PHPMD.BooleanGetMethodName)
9090
*/
91-
public function getTaxIncluded();
91+
public function getIsTaxIncluded();
9292

9393
/**
9494
* Set whether the tax is included in the unit price and row total

app/code/Magento/Tax/Model/Calculation/AbstractCalculator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ public function setCustomerId($customerId)
217217
*/
218218
public function calculate(QuoteDetailsItemInterface $item, $quantity, $round = true)
219219
{
220-
if ($item->getTaxIncluded()) {
220+
if ($item->getIsTaxIncluded()) {
221221
return $this->calculateWithTaxInPrice($item, $quantity, $round);
222222
} else {
223223
return $this->calculateWithTaxNotInPrice($item, $quantity, $round);

app/code/Magento/Tax/Model/Converter.php

Lines changed: 0 additions & 71 deletions
This file was deleted.

app/code/Magento/Tax/Model/Sales/Quote/ItemDetails.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class ItemDetails extends AbstractExtensibleModel implements QuoteDetailsItemInt
2121
const KEY_TAX_CLASS_KEY = 'tax_class_key';
2222
const KEY_UNIT_PRICE = 'unit_price';
2323
const KEY_QUANTITY = 'quantity';
24-
const KEY_TAX_INCLUDED = 'tax_included';
24+
const KEY_IS_TAX_INCLUDED = 'is_tax_included';
2525
const KEY_SHORT_DESCRIPTION = 'short_description';
2626
const KEY_DISCOUNT_AMOUNT = 'discount_amount';
2727
const KEY_PARENT_CODE = 'parent_code';
@@ -72,9 +72,9 @@ public function getQuantity()
7272
/**
7373
* {@inheritdoc}
7474
*/
75-
public function getTaxIncluded()
75+
public function getIsTaxIncluded()
7676
{
77-
return $this->getData(self::KEY_TAX_INCLUDED);
77+
return $this->getData(self::KEY_IS_TAX_INCLUDED);
7878
}
7979

8080
/**
@@ -180,7 +180,7 @@ public function setQuantity($quantity)
180180
*/
181181
public function setIsTaxIncluded($isTaxIncluded)
182182
{
183-
return $this->setData(self::KEY_TAX_INCLUDED, $isTaxIncluded);
183+
return $this->setData(self::KEY_IS_TAX_INCLUDED, $isTaxIncluded);
184184
}
185185

186186
/**

0 commit comments

Comments
 (0)