Skip to content

Commit a3f3090

Browse files
author
David
committed
[BUGFIX][11022] set function scope to private, fix unit tests
1 parent 6862394 commit a3f3090

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/code/Magento/Eav/Model/AttributeSetRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCr
128128
* @param \Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\Collection $collection
129129
* @return void
130130
*/
131-
protected function addFilterGroupToCollection(
131+
private function addFilterGroupToCollection(
132132
\Magento\Framework\Api\Search\FilterGroup $filterGroup,
133133
\Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\Collection $collection
134134
) {

app/code/Magento/Eav/Test/Unit/Model/AttributeSetRepositoryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public function testGetList()
212212
$searchCriteriaMock = $this->getMock('\Magento\Framework\Api\SearchCriteriaInterface');
213213

214214
$filterGroupMock = $this->getMock('\Magento\Framework\Api\Search\FilterGroup', [], [], '', false);
215-
$searchCriteriaMock->expects($this->once())->method('getFilterGroups')->willReturn([$filterGroupMock]);
215+
$searchCriteriaMock->expects($this->exactly(2))->method('getFilterGroups')->willReturn([$filterGroupMock]);
216216

217217
$filterMock = $this->getMock('\Magento\Framework\Api\Filter', [], [], '', false);
218218
$filterGroupMock->expects($this->once())->method('getFilters')->willReturn([$filterMock]);
@@ -273,7 +273,7 @@ public function testGetList()
273273
public function testGetListIfEntityTypeCodeIsNull()
274274
{
275275
$searchCriteriaMock = $this->getMock('\Magento\Framework\Api\SearchCriteriaInterface');
276-
$searchCriteriaMock->expects($this->once())->method('getFilterGroups')->willReturn([]);
276+
$searchCriteriaMock->expects($this->exactly(2))->method('getFilterGroups')->willReturn([]);
277277

278278
$collectionMock = $this->getMock(
279279
'\Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\Collection',

0 commit comments

Comments
 (0)