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 36
36
37
37
/* @var CouponRepositoryInterface $couponRepository */
38
38
$ couponRepository = $ objectManager ->get (CouponRepositoryInterface::class);
39
- for ($ index = 1 ; $ index <= 100 ; $ index ++) {
39
+ for ($ index = 1 ; $ index <= 30 ; $ index ++) {
40
40
$ coupon = $ objectManager ->create (Coupon::class);
41
41
$ coupon ->setRuleId ($ salesRule ->getId ())
42
42
->setCode ('coupon_code_ ' . $ index )
Original file line number Diff line number Diff line change 8
8
use Magento \SalesRule \Model \ResourceModel \Rule \Collection as RuleCollection ;
9
9
use Magento \TestFramework \Helper \Bootstrap ;
10
10
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
+
11
16
/** @var RuleCollection $collection */
12
17
$ collection = Bootstrap::getObjectManager ()->create (RuleCollection::class);
13
18
$ collection ->addFieldToFilter ('name ' , 'Rule with coupon list ' );
14
19
$ rule = $ collection ->getFirstItem ();
15
20
if ($ rule ->getId ()) {
16
21
$ rule ->delete ();
17
22
}
23
+
24
+ $ registry ->unregister ('isSecureArea ' );
25
+ $ registry ->register ('isSecureArea ' , false );
You can’t perform that action at this time.
0 commit comments