RuleTest.php 737 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\SalesRule\Model\ResourceModel;
  7. /**
  8. * @magentoDbIsolation enabled
  9. * @magentoAppIsolation enabled
  10. */
  11. class RuleTest extends \PHPUnit\Framework\TestCase
  12. {
  13. /**
  14. * @magentoDataFixture Magento/SalesRule/_files/rule_custom_product_attribute.php
  15. */
  16. public function testAfterSave()
  17. {
  18. $resource = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
  19. \Magento\SalesRule\Model\ResourceModel\Rule::class
  20. );
  21. $items = $resource->getActiveAttributes();
  22. $this->assertEquals([['attribute_code' => 'attribute_for_sales_rule_1']], $items);
  23. }
  24. }