@@ -34,7 +34,7 @@ public function testResetPasswordSuccess()
34
34
$ this ->passwordResetRequestEventCreate (
35
35
\Magento \Security \Model \PasswordResetRequestEvent::CUSTOMER_PASSWORD_RESET_REQUEST
36
36
);
37
- $ this ->getRequest ()->setPostValue (['customer_id ' => '1 ' ])->setMethod (HttpRequest::METHOD_POST );
37
+ $ this ->getRequest ()->setPostValue (['customer_id ' => '1 ' ])->setMethod (HttpRequest::METHOD_GET );
38
38
$ this ->dispatch ('backend/customer/index/resetPassword ' );
39
39
$ this ->assertSessionMessages (
40
40
$ this ->equalTo (['The customer will receive an email with a link to reset password. ' ]),
@@ -44,18 +44,18 @@ public function testResetPasswordSuccess()
44
44
}
45
45
46
46
/**
47
- * Checks reset password functionality cannot be performed with GET request
47
+ * Checks reset password functionality cannot be performed with POST request
48
48
*
49
49
* @magentoConfigFixture current_store customer/password/limit_password_reset_requests_method 0
50
50
* @magentoConfigFixture current_store customer/password/min_time_between_password_reset_requests 0
51
51
* @magentoDataFixture Magento/Customer/_files/customer.php
52
52
*/
53
- public function testResetPasswordWithGet ()
53
+ public function testResetPasswordWithPost ()
54
54
{
55
55
$ this ->passwordResetRequestEventCreate (
56
56
\Magento \Security \Model \PasswordResetRequestEvent::CUSTOMER_PASSWORD_RESET_REQUEST
57
57
);
58
- $ this ->getRequest ()->setPostValue (['customer_id ' => '1 ' ])->setMethod (HttpRequest::METHOD_GET );
58
+ $ this ->getRequest ()->setPostValue (['customer_id ' => '1 ' ])->setMethod (HttpRequest::METHOD_POST );
59
59
$ this ->dispatch ('backend/customer/index/resetPassword ' );
60
60
$ this ->assertEquals ('noroute ' , $ this ->getRequest ()->getControllerName ());
61
61
}
@@ -74,7 +74,7 @@ public function testResetPasswordMinTimeError()
74
74
$ this ->passwordResetRequestEventCreate (
75
75
\Magento \Security \Model \PasswordResetRequestEvent::CUSTOMER_PASSWORD_RESET_REQUEST
76
76
);
77
- $ this ->getRequest ()->setPostValue (['customer_id ' => '1 ' ])->setMethod (HttpRequest::METHOD_POST );
77
+ $ this ->getRequest ()->setPostValue (['customer_id ' => '1 ' ])->setMethod (HttpRequest::METHOD_GET );
78
78
$ this ->dispatch ('backend/customer/index/resetPassword ' );
79
79
$ this ->assertSessionMessages (
80
80
$ this ->equalTo (['The customer will receive an email with a link to reset password. ' ]),
@@ -97,7 +97,7 @@ public function testResetPasswordLimitError()
97
97
$ this ->passwordResetRequestEventCreate (
98
98
\Magento \Security \Model \PasswordResetRequestEvent::CUSTOMER_PASSWORD_RESET_REQUEST
99
99
);
100
- $ this ->getRequest ()->setPostValue (['customer_id ' => '1 ' ])->setMethod (HttpRequest::METHOD_POST );
100
+ $ this ->getRequest ()->setPostValue (['customer_id ' => '1 ' ])->setMethod (HttpRequest::METHOD_GET );
101
101
$ this ->dispatch ('backend/customer/index/resetPassword ' );
102
102
$ this ->assertSessionMessages (
103
103
$ this ->equalTo (['The customer will receive an email with a link to reset password. ' ]),
@@ -122,7 +122,7 @@ public function testResetPasswordWithSecurityViolationException()
122
122
$ this ->passwordResetRequestEventCreate (
123
123
\Magento \Security \Model \PasswordResetRequestEvent::ADMIN_PASSWORD_RESET_REQUEST
124
124
);
125
- $ this ->getRequest ()->setPostValue (['customer_id ' => '1 ' ])->setMethod (HttpRequest::METHOD_POST );
125
+ $ this ->getRequest ()->setPostValue (['customer_id ' => '1 ' ])->setMethod (HttpRequest::METHOD_GET );
126
126
$ this ->dispatch ('backend/customer/index/resetPassword ' );
127
127
$ this ->assertSessionMessages (
128
128
$ this ->equalTo (['The customer will receive an email with a link to reset password. ' ]),
0 commit comments