From 4810755a4751e3a389e2a39dcbaf55ab72c2149c Mon Sep 17 00:00:00 2001 From: magento-engcom-team Date: Tue, 6 Feb 2018 16:46:50 +0200 Subject: [PATCH] [2.3-develop] Forwardport of magento/magento2#12767 --- app/code/Magento/Eav/Model/Entity/AbstractEntity.php | 2 +- .../Magento/Eav/Test/Unit/Model/Entity/AttributeLoaderTest.php | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php index 934c921885d49..ef80f12b26721 100644 --- a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php +++ b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php @@ -66,7 +66,7 @@ abstract class AbstractEntity extends AbstractResource implements EntityInterfac * * @var array */ - protected $attributesByScope = []; + private $attributesByScope = []; /** * Two-dimensional array by table name and attribute name diff --git a/app/code/Magento/Eav/Test/Unit/Model/Entity/AttributeLoaderTest.php b/app/code/Magento/Eav/Test/Unit/Model/Entity/AttributeLoaderTest.php index 3370695b47d7e..6620cee4d5ddd 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/Entity/AttributeLoaderTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/Entity/AttributeLoaderTest.php @@ -78,7 +78,6 @@ public function testLoadAllAttributes() $attributeMock->expects($this->once())->method('setIsGlobal')->with(1)->willReturnSelf(); $attributeMock->expects($this->once())->method('setEntityType')->with($this->entityTypeMock)->willReturnSelf(); $attributeMock->expects($this->once())->method('setEntityTypeId')->with($entityTypeId)->willReturnSelf(); - $this->entityMock->expects($this->once())->method('addAttributeByScope')->willReturnSelf(); $this->attributeLoader->loadAllAttributes($this->entityMock, $dataObject); } @@ -102,7 +101,6 @@ public function testLoadAllAttributesAttributeCodesPresentInDefaultAttributes() ->method('getEntityAttributes')->willReturn($attributeCodes); $this->entityMock->expects($this->once())->method('getDefaultAttributes')->willReturn($defaultAttributes); $this->entityMock->expects($this->once())->method('unsetAttributes')->willReturnSelf(); - $this->entityMock->expects($this->atLeastOnce())->method('addAttributeByScope')->willReturnSelf(); $this->objectManagerMock->expects($this->never())->method('create'); $this->attributeLoader->loadAllAttributes($this->entityMock, $dataObject); }