Skip to content

Commit 9a63dad

Browse files
committed
Moved object manager to setup method.
1 parent 5ea6e72 commit 9a63dad

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

dev/tests/integration/testsuite/Magento/SalesRule/Model/Observer/AssignCouponDataAfterOrderCustomerAssignTest.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ class AssignCouponDataAfterOrderCustomerAssignTest extends \PHPUnit\Framework\Te
7575
*/
7676
private $customer;
7777

78+
7879
/**
79-
* AssignCouponDataAfterOrderCustomerAssignTest constructor.
80+
* @inheritdoc
8081
*/
81-
public function __construct($name = null, array $data = [], $dataName = '')
82+
protected function setUp()
8283
{
83-
parent::__construct($name, $data, $dataName);
8484
$this->objectManager = Bootstrap::getObjectManager();
8585
$this->eventManager = $this->createMock(\Magento\Framework\Event\ManagerInterface::class);
8686
$this->orderRepository = $this->objectManager->get(\Magento\Sales\Model\OrderRepository::class);
@@ -90,13 +90,7 @@ public function __construct($name = null, array $data = [], $dataName = '')
9090
$this->assignCouponToCustomerObserver = $this->objectManager->get(
9191
\Magento\SalesRule\Observer\AssignCouponDataAfterOrderCustomerAssignObserver::class
9292
);
93-
}
9493

95-
/**
96-
* @inheritdoc
97-
*/
98-
protected function setUp()
99-
{
10094
$this->salesRule = $this->prepareSalesRule();
10195
$this->coupon = $this->attachSalesruleCoupon($this->salesRule);
10296
$this->order = $this->makeOrderWithCouponAsGuest($this->coupon);

0 commit comments

Comments
 (0)