Skip to content

Commit 1666ce8

Browse files
committed
tear price change with tier price
1 parent d200ae8 commit 1666ce8

File tree

8 files changed

+15
-15
lines changed

8 files changed

+15
-15
lines changed

app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class AdvancedPricing extends \Magento\ImportExport\Model\Import\Entity\Abstract
5050

5151
const VALIDATOR_WEBSITE = 'validator_website';
5252

53-
const VALIDATOR_TEAR_PRICE = 'validator_tear_price';
53+
const VALIDATOR_TIER_PRICE = 'validator_tier_price';
5454

5555
/**
5656
* Validation failure message template definitions.
@@ -221,7 +221,7 @@ public function __construct(
221221
$this->_catalogProductEntity = $this->_resourceFactory->create()->getTable('catalog_product_entity');
222222
$this->_oldSkus = $this->retrieveOldSkus();
223223
$this->_validators[self::VALIDATOR_WEBSITE] = $websiteValidator;
224-
$this->_validators[self::VALIDATOR_TEAR_PRICE] = $tierPriceValidator;
224+
$this->_validators[self::VALIDATOR_TIER_PRICE] = $tierPriceValidator;
225225
$this->errorAggregator = $errorAggregator;
226226

227227
foreach (array_merge($this->errorMessageTemplates, $this->_messageTemplates) as $errorCode => $message) {
@@ -536,7 +536,7 @@ protected function getWebSiteId($websiteCode)
536536
*/
537537
protected function getCustomerGroupId($customerGroup)
538538
{
539-
$customerGroups = $this->_getValidator(self::VALIDATOR_TEAR_PRICE)->getCustomerGroups();
539+
$customerGroups = $this->_getValidator(self::VALIDATOR_TIER_PRICE)->getCustomerGroups();
540540
return $customerGroup == self::VALUE_ALL_GROUPS ? 0 : $customerGroups[$customerGroup];
541541
}
542542

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricingTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class AdvancedPricingTest extends \Magento\ImportExport\Test\Unit\Model\Import\A
5454
protected $websiteValidator;
5555

5656
/**
57-
* @var AdvancedPricing\Validator\TearPrice |\PHPUnit_Framework_MockObject_MockObject
57+
* @var AdvancedPricing\Validator\TierPrice |\PHPUnit_Framework_MockObject_MockObject
5858
*/
5959
protected $tierPriceValidator;
6060

app/code/Magento/Catalog/Model/Product/Type/Price.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public function getChildFinalPrice($product, $productQty, $childProduct, $childP
202202
}
203203

204204
/**
205-
* Gets the 'tear_price' array from the product
205+
* Gets the 'tier_price' array from the product
206206
*
207207
* @param Product $product
208208
* @param string $key

app/code/Magento/Catalog/Test/Unit/Model/Product/Attribute/Backend/GroupPrice/AbstractTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ public function testGetAffectedFields()
6565
$attribute->expects($this->any())->method('getAttributeId')->will($this->returnValue($attributeId));
6666
$attribute->expects($this->any())->method('isStatic')->will($this->returnValue(false));
6767
$attribute->expects($this->any())->method('getBackendTable')->will($this->returnValue('table'));
68-
$attribute->expects($this->any())->method('getName')->will($this->returnValue('tear_price'));
68+
$attribute->expects($this->any())->method('getName')->will($this->returnValue('tier_price'));
6969
$this->_model->setAttribute($attribute);
7070

7171
$object = new \Magento\Framework\DataObject();
72-
$object->setTearPrice([['price_id' => 10]]);
72+
$object->setTierPrice([['price_id' => 10]]);
7373
$object->setId(555);
7474

7575
$this->assertEquals(

app/code/Magento/Catalog/Test/Unit/Pricing/Price/BasePriceTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class BasePriceTest extends \PHPUnit\Framework\TestCase
3939
/**
4040
* @var \Magento\Catalog\Pricing\Price\TierPrice|\PHPUnit_Framework_MockObject_MockObject
4141
*/
42-
protected $tearPriceMock;
42+
protected $tierPriceMock;
4343

4444
/**
4545
* @var \Magento\Catalog\Pricing\Price\SpecialPrice|\PHPUnit_Framework_MockObject_MockObject
@@ -60,7 +60,7 @@ protected function setUp()
6060
$this->saleableItemMock = $this->createMock(\Magento\Catalog\Model\Product::class);
6161
$this->priceInfoMock = $this->createMock(\Magento\Framework\Pricing\PriceInfo\Base::class);
6262
$this->regularPriceMock = $this->createMock(\Magento\Catalog\Pricing\Price\RegularPrice::class);
63-
$this->tearPriceMock = $this->createMock(\Magento\Catalog\Pricing\Price\TierPrice::class);
63+
$this->tierPriceMock = $this->createMock(\Magento\Catalog\Pricing\Price\TierPrice::class);
6464
$this->specialPriceMock = $this->createMock(\Magento\Catalog\Pricing\Price\SpecialPrice::class);
6565
$this->calculatorMock = $this->createMock(\Magento\Framework\Pricing\Adjustment\Calculator::class);
6666

@@ -69,7 +69,7 @@ protected function setUp()
6969
->will($this->returnValue($this->priceInfoMock));
7070
$this->prices = [
7171
'regular_price' => $this->regularPriceMock,
72-
'tear_price' => $this->tearPriceMock,
72+
'tier_price' => $this->tierPriceMock,
7373
'special_price' => $this->specialPriceMock,
7474
];
7575

@@ -97,7 +97,7 @@ public function testGetValue($specialPriceValue, $expectedResult)
9797
$this->regularPriceMock->expects($this->exactly(3))
9898
->method('getValue')
9999
->will($this->returnValue(100));
100-
$this->tearPriceMock->expects($this->exactly(2))
100+
$this->tierPriceMock->expects($this->exactly(2))
101101
->method('getValue')
102102
->will($this->returnValue(99));
103103
$this->specialPriceMock->expects($this->any())

app/code/Magento/CatalogRule/Test/Unit/Model/Indexer/IndexBuilderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ public function testUpdateCatalogRuleGroupWebsiteData()
252252
);
253253
$resourceMock->expects($this->any())
254254
->method('getMainTable')
255-
->will($this->returnValue('catalog_product_entity_tear_price'));
255+
->will($this->returnValue('catalog_product_entity_tier_price'));
256256
$backendModelMock->expects($this->any())
257257
->method('getResource')
258258
->will($this->returnValue($resourceMock));

dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductTierPriceManagementTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ public function testGetList($customerGroupId, $count, $value, $qty)
3434
],
3535
];
3636

37-
$tearPriceList = $this->_webApiCall(
37+
$tierPriceList = $this->_webApiCall(
3838
$serviceInfo,
3939
['sku' => $productSku, 'customerGroupId' => $customerGroupId]
4040
);
4141

42-
$this->assertCount($count, $tearPriceList);
42+
$this->assertCount($count, $tierPriceList);
4343
if ($count) {
4444
$this->assertEquals($value, $tearPriceList[0]['value']);
4545
$this->assertEquals($qty, $tearPriceList[0]['qty']);

dev/tests/integration/testsuite/Magento/GroupedProduct/Pricing/Price/FinalPriceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function testFinalPrice()
2929
* @magentoDataFixture Magento/GroupedProduct/_files/product_grouped.php
3030
* @magentoAppIsolation enabled
3131
*/
32-
public function testFinalPriceWithTearPrice()
32+
public function testFinalPriceWithTierPrice()
3333
{
3434
$productRepository = Bootstrap::getObjectManager()
3535
->get(\Magento\Catalog\Api\ProductRepositoryInterface::class);

0 commit comments

Comments
 (0)