30 private $objectManagerHelper;
45 private $appStateMock;
50 private $registryMock;
60 private $responseMock;
64 $this->configMock = $this->getMockBuilder(Config::class)
65 ->disableOriginalConstructor()
67 $this->versionMock = $this->getMockBuilder(Version::class)
68 ->disableOriginalConstructor()
70 $this->appStateMock = $this->getMockBuilder(AppState::class)
71 ->disableOriginalConstructor()
73 $this->registryMock = $this->getMockBuilder(Registry::class)
74 ->disableOriginalConstructor()
76 $this->resultMock = $this->getMockBuilder(ResultInterface::class)
77 ->getMockForAbstractClass();
78 $this->responseMock = $this->getMockBuilder(ResponseHttp::class)
79 ->disableOriginalConstructor()
82 $this->objectManagerHelper =
new ObjectManagerHelper($this);
83 $this->plugin = $this->objectManagerHelper->getObject(
86 'registry' => $this->registryMock,
87 'config' => $this->configMock,
88 'state' => $this->appStateMock,
89 'version' => $this->versionMock
104 $this->responseMock->expects(static::exactly($setCacheDebugHeaderCount))
105 ->method(
'setHeader')
106 ->with(
'X-Magento-Debug', 1);
107 $this->registryMock->expects(static::once())
109 ->with(
'use_page_cache_plugin')
110 ->willReturn($usePlugin);
111 $this->configMock->expects(static::once())
112 ->method(
'isEnabled')
114 $this->configMock->expects(static::once())
117 $this->appStateMock->expects(static::exactly($getModeCount))
119 ->willReturn(AppState::MODE_DEVELOPER);
120 $this->versionMock->expects(static::exactly($processCount))
125 $this->plugin->afterRenderResult($this->resultMock, $this->resultMock, $this->responseMock)
testAfterRenderResult($usePlugin, $setCacheDebugHeaderCount, $getModeCount, $processCount)
afterRenderResultDataProvider()