6
6
namespace Magento \Framework \App \Test \Unit \PageCache ;
7
7
8
8
use \Magento \Framework \App \PageCache \Kernel ;
9
+ use \Magento \Framework \App \Http \ContextFactory ;
10
+ use \Magento \Framework \App \Response \HttpFactory ;
9
11
10
12
/**
11
13
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -33,10 +35,10 @@ class KernelTest extends \PHPUnit_Framework_TestCase
33
35
/** @var \Magento\Framework\App\Response\Http|\PHPUnit_Framework_MockObject_MockObject */
34
36
private $ httpResponseMock ;
35
37
36
- /** @var \Magento\Framework\App\Http\ ContextFactory|\PHPUnit_Framework_MockObject_MockObject */
38
+ /** @var ContextFactory|\PHPUnit_Framework_MockObject_MockObject */
37
39
private $ contextFactoryMock ;
38
40
39
- /** @var \Magento\Framework\App\Response\ HttpFactory|\PHPUnit_Framework_MockObject_MockObject */
41
+ /** @var HttpFactory|\PHPUnit_Framework_MockObject_MockObject */
40
42
private $ httpFactoryMock ;
41
43
42
44
/** @var \Magento\Framework\Serialize\SerializerInterface|\PHPUnit_Framework_MockObject_MockObject */
@@ -59,8 +61,8 @@ protected function setUp()
59
61
$ this ->requestMock = $ this ->getMock (\Magento \Framework \App \Request \Http::class, [], [], '' , false );
60
62
$ this ->serializer = $ this ->getMock (\Magento \Framework \Serialize \SerializerInterface::class, [], [], '' , false );
61
63
$ this ->responseMock = $ this ->getMock (\Magento \Framework \App \Response \Http::class, [], [], '' , false );
62
- $ this ->contextFactoryMock = $ this ->getMock (\ Magento \ Framework \ App \ Http \ ContextFactory::class, [], [], '' , false );
63
- $ this ->httpFactoryMock = $ this ->getMock (\ Magento \ Framework \ App \ Response \ HttpFactory::class, [], [], '' , false );
64
+ $ this ->contextFactoryMock = $ this ->getMock (ContextFactory::class, [' create ' ], [], '' , false );
65
+ $ this ->httpFactoryMock = $ this ->getMock (HttpFactory::class, [' create ' ], [], '' , false );
64
66
$ this ->responseMock ->expects ($ this ->any ())->method ('getHeaders ' )->willReturn ($ headersMock );
65
67
66
68
$ this ->kernel = new Kernel (
0 commit comments