File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
dev/tests/integration/testsuite/Magento/SalesRule/_files Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 3636
3737/* @var CouponRepositoryInterface $couponRepository */
3838$ couponRepository = $ objectManager ->get (CouponRepositoryInterface::class);
39- for ($ index = 1 ; $ index <= 100 ; $ index ++) {
39+ for ($ index = 1 ; $ index <= 30 ; $ index ++) {
4040 $ coupon = $ objectManager ->create (Coupon::class);
4141 $ coupon ->setRuleId ($ salesRule ->getId ())
4242 ->setCode ('coupon_code_ ' . $ index )
Original file line number Diff line number Diff line change 88use Magento \SalesRule \Model \ResourceModel \Rule \Collection as RuleCollection ;
99use Magento \TestFramework \Helper \Bootstrap ;
1010
11+ /** @var \Magento\Framework\Registry $registry */
12+ $ registry = Bootstrap::getObjectManager ()->get (\Magento \Framework \Registry::class);
13+ $ registry ->unregister ('isSecureArea ' );
14+ $ registry ->register ('isSecureArea ' , true );
15+
1116/** @var RuleCollection $collection */
1217$ collection = Bootstrap::getObjectManager ()->create (RuleCollection::class);
1318$ collection ->addFieldToFilter ('name ' , 'Rule with coupon list ' );
1419$ rule = $ collection ->getFirstItem ();
1520if ($ rule ->getId ()) {
1621 $ rule ->delete ();
1722}
23+
24+ $ registry ->unregister ('isSecureArea ' );
25+ $ registry ->register ('isSecureArea ' , false );
You can’t perform that action at this time.
0 commit comments