Skip to content

Commit 4882465

Browse files
author
Sergey Semenov
committed
MAGETWO-33074: Upgrade response class.
1 parent 75ea002 commit 4882465

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

dev/tests/unit/testsuite/Magento/PageCache/Model/Controller/Result/BuiltinPluginTest.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,17 @@ public function testAroundResult(
2424
$processCount
2525
) {
2626
$cacheControl = 'test';
27-
$response = $this->getMock('Magento\Framework\App\Response\Http', [], [], '', false);
2827

29-
$response->expects($getHeaderCount)->method('getHeader')->with('Cache-Control')
30-
->will($this->returnValue(['value' => $cacheControl]));
28+
$header = $this->getMockBuilder('Zend\Http\Header\HeaderInterface')
29+
->getMockForAbstractClass();
30+
$header->expects($this->any())->method('getFieldValue')
31+
->willReturn($cacheControl);
32+
33+
$response = $this->getMock('Magento\Framework\App\Response\Http', [], [], '', false);
34+
$response->expects($getHeaderCount)
35+
->method('getHeader')
36+
->with('Cache-Control')
37+
->willReturn($header);
3138
$response->expects($setCacheControlHeaderCount)->method('setHeader')
3239
->with('X-Magento-Cache-Control', $cacheControl);
3340
$response->expects($setCacheDebugHeaderCount)->method('setHeader')

0 commit comments

Comments
 (0)