7
7
8
8
namespace Magento \Customer \Test \Unit \Controller \Account ;
9
9
10
- use Magento \Customer \Api \SessionCleanerInterface ;
11
10
use Magento \Customer \Controller \Account \Logout ;
12
11
use Magento \Customer \Model \Session ;
13
12
use Magento \Framework \App \Action \Context ;
@@ -49,11 +48,6 @@ class LogoutTest extends TestCase
49
48
/** @var RedirectInterface|MockObject */
50
49
protected $ redirect ;
51
50
52
- /**
53
- * @var SessionCleanerInterface|MockObject
54
- */
55
- private $ sessionCleanerMock ;
56
-
57
51
protected function setUp (): void
58
52
{
59
53
$ this ->contextMock = $ this ->getMockBuilder (Context::class)
@@ -63,7 +57,6 @@ protected function setUp(): void
63
57
->disableOriginalConstructor ()
64
58
->setMethods (['getId ' , 'logout ' , 'setBeforeAuthUrl ' , 'setLastCustomerId ' ])
65
59
->getMock ();
66
- $ this ->sessionCleanerMock = $ this ->createMock (SessionCleanerInterface::class);
67
60
68
61
$ this ->cookieMetadataFactory = $ this ->getMockBuilder (CookieMetadataFactory::class)
69
62
->disableOriginalConstructor ()
@@ -90,7 +83,7 @@ protected function setUp(): void
90
83
->method ('getRedirect ' )
91
84
->willReturn ($ this ->redirect );
92
85
93
- $ this ->controller = new Logout ($ this ->contextMock , $ this ->sessionMock , $ this -> sessionCleanerMock );
86
+ $ this ->controller = new Logout ($ this ->contextMock , $ this ->sessionMock );
94
87
95
88
$ refClass = new \ReflectionClass (Logout::class);
96
89
$ cookieMetadataManagerProperty = $ refClass ->getProperty ('cookieMetadataManager ' );
@@ -124,11 +117,6 @@ public function testExecute()
124
117
->method ('setLastCustomerId ' )
125
118
->with ($ customerId );
126
119
127
- $ this ->sessionCleanerMock ->expects ($ this ->once ())
128
- ->method ('clearFor ' )
129
- ->with ($ customerId )
130
- ->willReturnSelf ();
131
-
132
120
$ this ->cookieManager ->expects ($ this ->once ())
133
121
->method ('getCookie ' )
134
122
->with ('mage-cache-sessid ' )
0 commit comments