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)
26
26
}
27
27
28
28
/**
29
- * Cleans persistence cookie on sales representative login
29
+ * Disable persistence for sales representative login
30
30
*
31
31
* @param AuthenticateCustomerBySecretInterface $subject
32
- * @param string $secret
33
- * @return string
32
+ * @return void
34
33
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
35
34
*/
36
- public function beforeExecute (AuthenticateCustomerBySecretInterface $ subject, string $ secret )
35
+ public function afterExecute (AuthenticateCustomerBySecretInterface $ subject )
37
36
{
38
37
if ($ this ->persistentSession ->isPersistent ()) {
39
38
$ this ->persistentSession ->getSession ()->removePersistentCookie ();
40
39
}
41
- return $ secret ;
42
40
}
43
41
}
Original file line number Diff line number Diff line change @@ -46,10 +46,9 @@ protected function setUp(): void
46
46
47
47
public function testBeforeExecute ()
48
48
{
49
- $ key = 'key ' ;
50
49
$ this ->persistentSessionMock ->expects ($ this ->once ())->method ('isPersistent ' )->willReturn (true );
51
50
$ 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 );
54
53
}
55
54
}
You can’t perform that action at this time.
0 commit comments