File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
dev/tests/functional/tests/app/Magento/Customer/Test/TestStep Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -29,13 +29,22 @@ class CreateCustomerStep implements TestStepInterface
29
29
*/
30
30
protected $ persistCustomer = true ;
31
31
32
+ /**
33
+ * Logout customer on frontend step.
34
+ *
35
+ * @var LogoutCustomerOnFrontendStep
36
+ */
37
+ protected $ logoutCustomerOnFrontend ;
38
+
32
39
/**
33
40
* @constructor
41
+ * @param LogoutCustomerOnFrontendStep $logout
34
42
* @param Customer $customer
35
43
* @param string $checkoutMethod
36
44
*/
37
- public function __construct (Customer $ customer , $ checkoutMethod = '' )
45
+ public function __construct (LogoutCustomerOnFrontendStep $ logout , Customer $ customer , $ checkoutMethod = '' )
38
46
{
47
+ $ this ->logoutCustomerOnFrontend = $ logout ;
39
48
$ this ->customer = $ customer ;
40
49
if ($ checkoutMethod === 'register ' || $ checkoutMethod === 'guest ' ) {
41
50
$ this ->persistCustomer = false ;
@@ -55,4 +64,14 @@ public function run()
55
64
56
65
return ['customer ' => $ this ->customer ];
57
66
}
67
+
68
+ /**
69
+ * Logout customer on fronted.
70
+ *
71
+ * @return void
72
+ */
73
+ public function cleanup ()
74
+ {
75
+ $ this ->logoutCustomerOnFrontend ->run ();
76
+ }
58
77
}
You can’t perform that action at this time.
0 commit comments