Skip to content

Commit 55c8e98

Browse files
author
Dmytro Aponasenko
committed
Merge branch 'MTA-1284' of https://github.corp.ebay.com/magento-qmt/magento2ce into develop
2 parents e7a75d2 + f509859 commit 55c8e98

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/CreateCustomerStep.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,22 @@ class CreateCustomerStep implements TestStepInterface
2929
*/
3030
protected $persistCustomer = true;
3131

32+
/**
33+
* Logout customer on frontend step.
34+
*
35+
* @var LogoutCustomerOnFrontendStep
36+
*/
37+
protected $logoutCustomerOnFrontend;
38+
3239
/**
3340
* @constructor
41+
* @param LogoutCustomerOnFrontendStep $logout
3442
* @param Customer $customer
3543
* @param string $checkoutMethod
3644
*/
37-
public function __construct(Customer $customer, $checkoutMethod = '')
45+
public function __construct(LogoutCustomerOnFrontendStep $logout, Customer $customer, $checkoutMethod = '')
3846
{
47+
$this->logoutCustomerOnFrontend = $logout;
3948
$this->customer = $customer;
4049
if ($checkoutMethod === 'register' || $checkoutMethod === 'guest') {
4150
$this->persistCustomer = false;
@@ -55,4 +64,14 @@ public function run()
5564

5665
return ['customer' => $this->customer];
5766
}
67+
68+
/**
69+
* Logout customer on fronted.
70+
*
71+
* @return void
72+
*/
73+
public function cleanup()
74+
{
75+
$this->logoutCustomerOnFrontend->run();
76+
}
5877
}

0 commit comments

Comments
 (0)