public function testAfterGenerateXmlNoDepersonalize()
 {
     $this->catalogSessionMock->expects($this->never())->method('clearStorage');
     $this->depersonalizeCheckerMock->expects($this->once())->method('checkIfDepersonalize')->willReturn(false);
     $actualResult = $this->plugin->afterGenerateXml($this->layoutMock, $this->resultLayout);
     $this->assertEquals($this->resultLayout, $actualResult);
 }
Example #2
0
 public function testLayoutIsNotCacheable()
 {
     $this->moduleManagerMock->expects($this->once())->method('isEnabled')->with($this->equalTo('Magento_PageCache'))->willReturn(true);
     $this->cacheConfigMock->expects($this->once())->method('isEnabled')->willReturn(true);
     $this->requestMock->expects($this->once($this->once()))->method('isAjax')->willReturn(false);
     $this->layoutMock->expects($this->once())->method('isCacheable')->willReturn(false);
     $this->catalogSessionMock->expects($this->never())->method('clearStorage');
     $actualResult = $this->plugin->afterGenerateXml($this->layoutMock, $this->resultLayout);
     $this->assertEquals($this->resultLayout, $actualResult);
 }