Skip to content

Commit

Permalink
MAGETWO-91620: It is not possible to use function setInAllAttributeSe…
Browse files Browse the repository at this point in the history
…tsFilter() together with getAllIds() for class Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection

- Added integration test
  • Loading branch information
oksana-kr committed Aug 10, 2018
1 parent d93e5c7 commit 279e1f5
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@ public function testSetAttributeGroupFilter()
$this->assertEquals([$includeGroupId], $groups);
}

/**
* Test if getAllIds method return results after using setInAllAttributeSetsFilter method
*
* @covers \Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection::setInAllAttributeSetsFilter()
* @covers \Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection::getAllIds()
*/
public function testSetInAllAttributeSetsFilterWithGetAllIds()
{
$sets = [1];
$this->_model->setInAllAttributeSetsFilter($sets);
$attributeIds = $this->_model->getAllIds();
$this->assertGreaterThan(0, count($attributeIds));
}

/**
* Returns array of group ids, present in collection attributes
*
Expand Down

0 comments on commit 279e1f5

Please sign in to comment.