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
LockCustomerOnLoginPageTest.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\Customer\Test\Fixture\Customer
;
11
use Magento\Customer\Test\Page\CustomerAccountLogin;
12
use
Magento\Config\Test\Fixture\ConfigData
;
13
use Magento\Mtf\Fixture\FixtureFactory;
14
28
class
LockCustomerOnLoginPageTest
extends
Injectable
29
{
30
/* tags */
31
const
MVP
=
'yes'
;
32
const
SEVERITY
=
'S1'
;
33
/* end tags */
34
40
protected
$customerAccountLogin
;
41
47
protected
$configData
;
48
55
public
function
__inject
(
56
CustomerAccountLogin
$customerAccountLogin
57
) {
58
$this->customerAccountLogin =
$customerAccountLogin
;
59
}
60
71
public
function
test
(
72
Customer $initialCustomer,
73
$attempts,
74
FixtureFactory $fixtureFactory,
75
$incorrectPassword,
76
$configData
=
null
77
) {
78
$this->configData =
$configData
;
79
80
// Preconditions
81
$this->objectManager->create(
82
\
Magento
\Config\Test\TestStep\SetupConfigurationStep::class,
83
[
'configData'
=> $this->configData]
84
)->run();
85
$initialCustomer->persist();
86
$incorrectCustomer = $fixtureFactory->createByCode(
87
'customer'
,
88
[
'data'
=> [
'email'
=> $initialCustomer->getEmail(),
'password'
=> $incorrectPassword]]
89
);
90
91
// Steps
92
for
(
$i
= 0;
$i
< $attempts;
$i
++) {
93
$this->customerAccountLogin->open();
94
$this->customerAccountLogin->getLoginBlock()->fill($incorrectCustomer);
95
$this->customerAccountLogin->getLoginBlock()->submit();
96
}
97
}
98
104
public
function
tearDown
()
105
{
106
$this->objectManager->create(
107
\
Magento
\Config\Test\TestStep\SetupConfigurationStep::class,
108
[
'configData'
=> $this->configData,
'rollback'
=>
true
]
109
)->run();
110
}
111
}
Magento\Security\Test\TestCase\LockCustomerOnLoginPageTest
Definition:
LockCustomerOnLoginPageTest.php:28
Magento\Security\Test\TestCase
Definition:
LockAdminUserWhenCreatingNewIntegrationTest.php:7
Magento\Security\Test\TestCase\LockCustomerOnLoginPageTest\$configData
$configData
Definition:
LockCustomerOnLoginPageTest.php:47
Magento\Security\Test\TestCase\LockCustomerOnLoginPageTest\MVP
const MVP
Definition:
LockCustomerOnLoginPageTest.php:31
Magento\Config\Test\Fixture\ConfigData
Definition:
Section.php:7
Magento\Security\Test\TestCase\LockCustomerOnLoginPageTest\test
test(Customer $initialCustomer, $attempts, FixtureFactory $fixtureFactory, $incorrectPassword, $configData=null)
Definition:
LockCustomerOnLoginPageTest.php:71
Magento\Security\Test\TestCase\LockCustomerOnLoginPageTest\SEVERITY
const SEVERITY
Definition:
LockCustomerOnLoginPageTest.php:32
Magento\Security\Test\TestCase\LockCustomerOnLoginPageTest\tearDown
tearDown()
Definition:
LockCustomerOnLoginPageTest.php:104
Magento
Magento\Security\Test\TestCase\LockCustomerOnLoginPageTest\__inject
__inject(CustomerAccountLogin $customerAccountLogin)
Definition:
LockCustomerOnLoginPageTest.php:55
Magento\Customer\Test\Fixture\Customer
Definition:
Address.php:7
$i
$i
Definition:
gallery.phtml:31
Magento\Security\Test\TestCase\LockCustomerOnLoginPageTest\$customerAccountLogin
$customerAccountLogin
Definition:
LockCustomerOnLoginPageTest.php:40