Skip to content

Commit afe4394

Browse files
committed
Replace erroneous usage of unsData method
1 parent 5916c5a commit afe4394

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

app/code/Magento/GroupedProduct/Model/Product/Type/Grouped.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public function getAssociatedProducts($product)
236236
*/
237237
public function flushAssociatedProductsCache($product)
238238
{
239-
return $product->unsData($this->_keyAssociatedProducts);
239+
return $product->unsetData($this->_keyAssociatedProducts);
240240
}
241241

242242
/**

app/code/Magento/GroupedProduct/Test/Unit/Model/Product/Type/GroupedTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,9 +611,9 @@ public function testPrepareForCartAdvancedZeroQty()
611611

612612
public function testFlushAssociatedProductsCache()
613613
{
614-
$productMock = $this->createPartialMock(\Magento\Catalog\Model\Product::class, ['unsData']);
614+
$productMock = $this->createPartialMock(\Magento\Catalog\Model\Product::class, ['unsetData']);
615615
$productMock->expects($this->once())
616-
->method('unsData')
616+
->method('unsetData')
617617
->with('_cache_instance_associated_products')
618618
->willReturnSelf();
619619
$this->assertEquals($productMock, $this->_model->flushAssociatedProductsCache($productMock));

app/code/Magento/Reports/Model/Product/Index/AbstractIndex.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ public function clean()
252252
public function registerIds($productIds)
253253
{
254254
$this->_getResource()->registerIds($this, $productIds);
255-
$this->_getSession()->unsData($this->_countCacheKey);
255+
$this->_getSession()->unsetData($this->_countCacheKey);
256256
return $this;
257257
}
258258
}

dev/tests/integration/testsuite/Magento/Newsletter/Controller/ManageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ protected function setUp()
4040
protected function tearDown()
4141
{
4242
$this->customerSession->setCustomerId(null);
43-
$this->coreSession->unsData('_form_key');
43+
$this->coreSession->unsetData('_form_key');
4444
}
4545

4646
/**

0 commit comments

Comments
 (0)