11 use Psr\Log\LoggerInterface;
26 private $appConfigMock;
33 $this->synchronizerMock = $this
34 ->getMockBuilder(Synchronizer::class)
35 ->disableOriginalConstructor()
37 $this->safeReflectionClassMock = $this->getMockBuilder(\SafeReflectionClass::class)
38 ->disableOriginalConstructor()
40 $this->appConfigMock = $this->getMockBuilder(Config::class)
41 ->disableOriginalConstructor()
43 $this->loggerMock = $this->getMockBuilder(LoggerInterface::class)
44 ->getMockForAbstractClass();
47 $this->synchronizerMock,
56 $this->appConfigMock->expects($this->once())
60 $actionFirst = $this->getMockBuilder(ProductFrontendActionInterface::class)
61 ->getMockForAbstractClass();
62 $actionSecond = $this->getMockBuilder(ProductFrontendActionInterface::class)
63 ->getMockForAbstractClass();
64 $actions = [$actionFirst, $actionSecond];
65 $actionFirst->expects($this->exactly(2))
66 ->method(
'getProductId')
68 $actionFirst->expects($this->once())
69 ->method(
'getAddedAt')
71 $actionSecond->expects($this->once())
72 ->method(
'getAddedAt')
74 $actionSecond->expects($this->exactly(2))
75 ->method(
'getProductId')
77 $this->synchronizerMock->expects($this->once())
78 ->method(
'getActionsByType')
79 ->willReturn($actions);
95 $this->model->getSectionData()
101 $this->appConfigMock->expects($this->once())
112 $this->model->getSectionData()
const ALLOW_SYNC_WITH_BACKEND_PATH
testGetSectionDataNoSync()