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
integration
testsuite
Magento
Captcha
Observer
ResetAttemptForFrontendAccountEditObserverTest.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\Captcha\Observer
;
9
10
use
Magento\Captcha\Model\ResourceModel\Log
as CaptchaLog;
11
use Magento\Captcha\Model\ResourceModel\LogFactory;
12
use
Magento\Framework\Event\ManagerInterface
;
13
use
Magento\Framework\ObjectManagerInterface
;
14
20
class
ResetAttemptForFrontendAccountEditObserverTest
extends
\PHPUnit\Framework\TestCase
21
{
25
private
$objectManager;
26
27
public
function
setUp
()
28
{
29
$this->objectManager =
\Magento\TestFramework\Helper\Bootstrap::getObjectManager
();
30
}
31
35
public
function
testAccountEditRemovesFailedAttempts()
36
{
37
$customerEmail
=
'
[email protected]
'
;
38
$captchaLogFactory = $this->objectManager->get(LogFactory::class);
39
$eventManager = $this->objectManager->get(ManagerInterface::class);
40
41
$eventManager->dispatch(
42
'customer_account_edited'
,
43
[
'email'
=>
$customerEmail
]
44
);
45
49
$captchaLog
= $captchaLogFactory->create();
50
51
self::assertEquals(0,
$captchaLog
->countAttemptsByUserLogin(
$customerEmail
));
52
}
53
}
Magento\Captcha\Observer\ResetAttemptForFrontendAccountEditObserverTest\setUp
setUp()
Definition:
ResetAttemptForFrontendAccountEditObserverTest.php:27
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
Magento\Captcha\Observer\ResetAttemptForFrontendAccountEditObserverTest
Definition:
ResetAttemptForFrontendAccountEditObserverTest.php:20
$captchaLog
$captchaLog
Definition:
failed_logins_backend.php:16
Magento\Captcha\Model\ResourceModel\Log
Definition:
Log.php:13
Magento\Captcha\Observer
Definition:
CaseBackendLoginActionWithInvalidCaptchaReturnsErrorTest.php:6
Magento\Framework\Event\ManagerInterface
Definition:
ManagerInterface.php:12
$customerEmail
$customerEmail
Definition:
order_with_customer_and_two_simple_products.php:63
Magento\TestFramework\Helper\Bootstrap\getObjectManager
static getObjectManager()
Definition:
Bootstrap.php:125