77
88namespace Magento \Customer \Test \Unit \Controller \Account ;
99
10- use Magento \Customer \Api \SessionCleanerInterface ;
1110use Magento \Customer \Controller \Account \Logout ;
1211use Magento \Customer \Model \Session ;
1312use Magento \Framework \App \Action \Context ;
@@ -49,11 +48,6 @@ class LogoutTest extends TestCase
4948 /** @var RedirectInterface|MockObject */
5049 protected $ redirect ;
5150
52- /**
53- * @var SessionCleanerInterface|MockObject
54- */
55- private $ sessionCleanerMock ;
56-
5751 protected function setUp (): void
5852 {
5953 $ this ->contextMock = $ this ->getMockBuilder (Context::class)
@@ -63,7 +57,6 @@ protected function setUp(): void
6357 ->disableOriginalConstructor ()
6458 ->setMethods (['getId ' , 'logout ' , 'setBeforeAuthUrl ' , 'setLastCustomerId ' ])
6559 ->getMock ();
66- $ this ->sessionCleanerMock = $ this ->createMock (SessionCleanerInterface::class);
6760
6861 $ this ->cookieMetadataFactory = $ this ->getMockBuilder (CookieMetadataFactory::class)
6962 ->disableOriginalConstructor ()
@@ -90,7 +83,7 @@ protected function setUp(): void
9083 ->method ('getRedirect ' )
9184 ->willReturn ($ this ->redirect );
9285
93- $ this ->controller = new Logout ($ this ->contextMock , $ this ->sessionMock , $ this -> sessionCleanerMock );
86+ $ this ->controller = new Logout ($ this ->contextMock , $ this ->sessionMock );
9487
9588 $ refClass = new \ReflectionClass (Logout::class);
9689 $ cookieMetadataManagerProperty = $ refClass ->getProperty ('cookieMetadataManager ' );
@@ -124,11 +117,6 @@ public function testExecute()
124117 ->method ('setLastCustomerId ' )
125118 ->with ($ customerId );
126119
127- $ this ->sessionCleanerMock ->expects ($ this ->once ())
128- ->method ('clearFor ' )
129- ->with ($ customerId )
130- ->willReturnSelf ();
131-
132120 $ this ->cookieManager ->expects ($ this ->once ())
133121 ->method ('getCookie ' )
134122 ->with ('mage-cache-sessid ' )
0 commit comments