File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed
app/code/Magento/Persistent Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -26,18 +26,16 @@ public function __construct(PersistentSession $persistentSession)
2626 }
2727
2828 /**
29- * Cleans persistence cookie on sales representative login
29+ * Disable persistence for sales representative login
3030 *
3131 * @param AuthenticateCustomerBySecretInterface $subject
32- * @param string $secret
33- * @return string
32+ * @return void
3433 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
3534 */
36- public function beforeExecute (AuthenticateCustomerBySecretInterface $ subject, string $ secret )
35+ public function afterExecute (AuthenticateCustomerBySecretInterface $ subject )
3736 {
3837 if ($ this ->persistentSession ->isPersistent ()) {
3938 $ this ->persistentSession ->getSession ()->removePersistentCookie ();
4039 }
41- return $ secret ;
4240 }
4341}
Original file line number Diff line number Diff line change @@ -46,10 +46,9 @@ protected function setUp(): void
4646
4747 public function testBeforeExecute ()
4848 {
49- $ key = 'key ' ;
5049 $ this ->persistentSessionMock ->expects ($ this ->once ())->method ('isPersistent ' )->willReturn (true );
5150 $ this ->persistentSessionModelMock ->expects ($ this ->once ())->method ('removePersistentCookie ' );
52- $ result = $ this ->plugin ->beforeExecute ($ this ->subjectMock , $ key );
53- $ this ->assertEquals ($ key , $ result );
51+ $ result = $ this ->plugin ->afterExecute ($ this ->subjectMock );
52+ $ this ->assertEquals (null , $ result );
5453 }
5554}
You can’t perform that action at this time.
0 commit comments