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
Security
Test
TestCase
LockCustomerOnEditPageTest.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Security\Test\TestCase
;
8
9
use Magento\Mtf\TestCase\Injectable;
10
use Magento\Cms\Test\Page\CmsIndex;
11
use
Magento\Customer\Test\Fixture\Customer
;
12
use Magento\Customer\Test\Page\CustomerAccountEdit;
13
use Magento\Customer\Test\Page\CustomerAccountIndex;
14
use Magento\Customer\Test\Page\CustomerAccountLogin;
15
35
class
LockCustomerOnEditPageTest
extends
Injectable
36
{
37
/* tags */
38
const
MVP
=
'yes'
;
39
const
SEVERITY
=
'S1'
;
40
/* end tags */
41
47
protected
$cmsIndex
;
48
54
protected
$customerAccountLogin
;
55
61
protected
$customerAccountIndex
;
62
68
protected
$customerAccountEdit
;
69
75
protected
$configData
;
76
86
public
function
__inject
(
87
CmsIndex
$cmsIndex
,
88
CustomerAccountLogin
$customerAccountLogin
,
89
CustomerAccountIndex
$customerAccountIndex
,
90
CustomerAccountEdit
$customerAccountEdit
91
) {
92
$this->cmsIndex =
$cmsIndex
;
93
$this->customerAccountLogin =
$customerAccountLogin
;
94
$this->customerAccountIndex =
$customerAccountIndex
;
95
$this->customerAccountEdit =
$customerAccountEdit
;
96
}
97
107
public
function
test
(
108
Customer $initialCustomer,
109
Customer
$customer
,
110
$attempts,
111
$configData
=
null
112
) {
113
$this->configData =
$configData
;
114
// Preconditions
115
$this->objectManager->create(
116
\
Magento
\Config\Test\TestStep\SetupConfigurationStep::class,
117
[
'configData'
=> $this->configData]
118
)->run();
119
$initialCustomer->persist();
120
121
// Steps
122
$this->objectManager->create(
123
\
Magento
\Customer\Test\TestStep\LoginCustomerOnFrontendStep::class,
124
[
'customer'
=> $initialCustomer]
125
)->run();
126
127
$this->cmsIndex->getLinksBlock()->openLink(
'My Account'
);
128
$this->customerAccountIndex->getInfoBlock()->openChangePassword();
129
for
(
$i
= 0;
$i
< $attempts;
$i
++) {
130
if
(
$i
> 0) {
131
$this->customerAccountIndex->getInfoBlock()->checkChangePassword();
132
}
133
$this->customerAccountEdit->getAccountInfoForm()->fill(
$customer
);
134
$this->customerAccountEdit->getAccountInfoForm()->submit();
135
}
136
}
137
143
public
function
tearDown
()
144
{
145
$this->objectManager->create(
146
\
Magento
\Config\Test\TestStep\SetupConfigurationStep::class,
147
[
'configData'
=> $this->configData,
'rollback'
=>
true
]
148
)->run();
149
}
150
}
Magento\Security\Test\TestCase\LockCustomerOnEditPageTest\test
test(Customer $initialCustomer, Customer $customer, $attempts, $configData=null)
Definition:
LockCustomerOnEditPageTest.php:107
Magento\Security\Test\TestCase\LockCustomerOnEditPageTest\SEVERITY
const SEVERITY
Definition:
LockCustomerOnEditPageTest.php:39
Magento\Security\Test\TestCase
Definition:
LockAdminUserWhenCreatingNewIntegrationTest.php:7
Magento\Security\Test\TestCase\LockCustomerOnEditPageTest\__inject
__inject(CmsIndex $cmsIndex, CustomerAccountLogin $customerAccountLogin, CustomerAccountIndex $customerAccountIndex, CustomerAccountEdit $customerAccountEdit)
Definition:
LockCustomerOnEditPageTest.php:86
Magento\Security\Test\TestCase\LockCustomerOnEditPageTest
Definition:
LockCustomerOnEditPageTest.php:35
$customer
$customer
Definition:
customers.php:11
Magento\Security\Test\TestCase\LockCustomerOnEditPageTest\$cmsIndex
$cmsIndex
Definition:
LockCustomerOnEditPageTest.php:47
Magento\Security\Test\TestCase\LockCustomerOnEditPageTest\tearDown
tearDown()
Definition:
LockCustomerOnEditPageTest.php:143
Magento\Security\Test\TestCase\LockCustomerOnEditPageTest\$customerAccountIndex
$customerAccountIndex
Definition:
LockCustomerOnEditPageTest.php:61
Magento\Security\Test\TestCase\LockCustomerOnEditPageTest\$configData
$configData
Definition:
LockCustomerOnEditPageTest.php:75
Magento
Magento\Security\Test\TestCase\LockCustomerOnEditPageTest\$customerAccountLogin
$customerAccountLogin
Definition:
LockCustomerOnEditPageTest.php:54
Magento\Security\Test\TestCase\LockCustomerOnEditPageTest\MVP
const MVP
Definition:
LockCustomerOnEditPageTest.php:38
Magento\Customer\Test\Fixture\Customer
Definition:
Address.php:7
$i
$i
Definition:
gallery.phtml:31
Magento\Security\Test\TestCase\LockCustomerOnEditPageTest\$customerAccountEdit
$customerAccountEdit
Definition:
LockCustomerOnEditPageTest.php:68