Skip to content

Commit 279e1f5

Browse files
committed
MAGETWO-91620: It is not possible to use function setInAllAttributeSetsFilter() together with getAllIds() for class Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection
- Added integration test
1 parent d93e5c7 commit 279e1f5

File tree

1 file changed

+14
-0
lines changed
  • dev/tests/integration/testsuite/Magento/Eav/Model/ResourceModel/Entity/Attribute

1 file changed

+14
-0
lines changed

dev/tests/integration/testsuite/Magento/Eav/Model/ResourceModel/Entity/Attribute/CollectionTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,20 @@ public function testSetAttributeGroupFilter()
5252
$this->assertEquals([$includeGroupId], $groups);
5353
}
5454

55+
/**
56+
* Test if getAllIds method return results after using setInAllAttributeSetsFilter method
57+
*
58+
* @covers \Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection::setInAllAttributeSetsFilter()
59+
* @covers \Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection::getAllIds()
60+
*/
61+
public function testSetInAllAttributeSetsFilterWithGetAllIds()
62+
{
63+
$sets = [1];
64+
$this->_model->setInAllAttributeSetsFilter($sets);
65+
$attributeIds = $this->_model->getAllIds();
66+
$this->assertGreaterThan(0, count($attributeIds));
67+
}
68+
5569
/**
5670
* Returns array of group ids, present in collection attributes
5771
*

0 commit comments

Comments
 (0)