Skip to content

Commit aa56b87

Browse files
committed
MAGETWO-62514: Remove uses of serialize/unserialize in \Magento\Framework\App\PageCache\Kernel
1 parent 1efa63f commit aa56b87

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/internal/Magento/Framework/App/Test/Unit/PageCache/KernelTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
namespace Magento\Framework\App\Test\Unit\PageCache;
77

88
use \Magento\Framework\App\PageCache\Kernel;
9+
use \Magento\Framework\App\Http\ContextFactory;
10+
use \Magento\Framework\App\Response\HttpFactory;
911

1012
/**
1113
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -33,10 +35,10 @@ class KernelTest extends \PHPUnit_Framework_TestCase
3335
/** @var \Magento\Framework\App\Response\Http|\PHPUnit_Framework_MockObject_MockObject */
3436
private $httpResponseMock;
3537

36-
/** @var \Magento\Framework\App\Http\ContextFactory|\PHPUnit_Framework_MockObject_MockObject */
38+
/** @var ContextFactory|\PHPUnit_Framework_MockObject_MockObject */
3739
private $contextFactoryMock;
3840

39-
/** @var \Magento\Framework\App\Response\HttpFactory|\PHPUnit_Framework_MockObject_MockObject */
41+
/** @var HttpFactory|\PHPUnit_Framework_MockObject_MockObject */
4042
private $httpFactoryMock;
4143

4244
/** @var \Magento\Framework\Serialize\SerializerInterface|\PHPUnit_Framework_MockObject_MockObject */
@@ -59,8 +61,8 @@ protected function setUp()
5961
$this->requestMock = $this->getMock(\Magento\Framework\App\Request\Http::class, [], [], '', false);
6062
$this->serializer = $this->getMock(\Magento\Framework\Serialize\SerializerInterface::class, [], [], '', false);
6163
$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);
6466
$this->responseMock->expects($this->any())->method('getHeaders')->willReturn($headersMock);
6567

6668
$this->kernel = new Kernel(

0 commit comments

Comments
 (0)