Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
magento2-base
dev
tests
functional
tests
app
Magento
Customer
Test
TestStep
CreateCustomerStep.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Customer\Test\TestStep
;
8
9
use
Magento\Customer\Test\Fixture\Customer
;
10
use Magento\Mtf\TestStep\TestStepInterface;
11
16
class
CreateCustomerStep
implements
TestStepInterface
17
{
23
protected
$customer
;
24
30
protected
$persistCustomer
=
true
;
31
37
protected
$logoutCustomerOnFrontend
;
38
45
public
function
__construct
(
LogoutCustomerOnFrontendStep
$logout, Customer
$customer
, $checkoutMethod =
''
)
46
{
47
$this->logoutCustomerOnFrontend = $logout;
48
$this->customer =
$customer
;
49
if
($checkoutMethod ===
'register'
50
|| $checkoutMethod ===
'guest'
51
|| $checkoutMethod ===
'register_before_checkout'
) {
52
$this->persistCustomer =
false
;
53
}
54
}
55
61
public
function
run
()
62
{
63
if
($this->persistCustomer) {
64
$this->customer->persist();
65
}
66
67
return
[
'customer'
=>
$this->customer
];
68
}
69
75
public
function
cleanup
()
76
{
77
$this->logoutCustomerOnFrontend->run();
78
}
79
}
Magento\Customer\Test\TestStep\CreateCustomerStep\__construct
__construct(LogoutCustomerOnFrontendStep $logout, Customer $customer, $checkoutMethod='')
Definition:
CreateCustomerStep.php:45
Magento\Customer\Test\TestStep\CreateCustomerStep\$logoutCustomerOnFrontend
$logoutCustomerOnFrontend
Definition:
CreateCustomerStep.php:37
Magento\Customer\Test\TestStep\CreateCustomerStep\run
run()
Definition:
CreateCustomerStep.php:61
Magento\Customer\Test\TestStep\LogoutCustomerOnFrontendStep
Definition:
LogoutCustomerOnFrontendStep.php:16
Magento\Customer\Test\TestStep\CreateCustomerStep
Definition:
CreateCustomerStep.php:16
Magento\Customer\Test\TestStep\CreateCustomerStep\cleanup
cleanup()
Definition:
CreateCustomerStep.php:75
Magento\Customer\Test\TestStep\CreateCustomerStep\$persistCustomer
$persistCustomer
Definition:
CreateCustomerStep.php:30
Magento\Customer\Test\TestStep
Definition:
CreateCustomerStep.php:7
Magento\Customer\Test\Fixture\Customer
Definition:
Address.php:7
Magento\Customer\Test\TestStep\CreateCustomerStep\$customer
$customer
Definition:
CreateCustomerStep.php:23