15 private $jobStaticRegenerate;
22 'getCleanFilesObject',
37 $modeObjectMock->expects($this->once())
43 ->expects($this->once())
44 ->method(
'regenerateStatic');
46 $this->jobStaticRegenerate
47 ->expects($this->once())
48 ->method(
'getFilesystem')
49 ->will($this->returnValue($filesystemMock));
51 $this->jobStaticRegenerate
52 ->expects($this->once())
53 ->method(
'getModeObject')
54 ->will($this->returnValue($modeObjectMock));
56 $this->jobStaticRegenerate
57 ->expects($this->once())
58 ->method(
'getOutputObject')
61 $this->jobStaticRegenerate->execute();
70 $modeObjectMock->expects($this->once())
74 $this->jobStaticRegenerate
75 ->expects($this->once())
76 ->method(
'getModeObject')
77 ->will($this->returnValue($modeObjectMock));
81 ->expects($this->exactly(3))
83 $this->jobStaticRegenerate
84 ->expects($this->exactly(3))
85 ->method(
'getStatusObject')
86 ->will($this->returnValue($statusObject));
90 ->expects($this->once())
92 $this->jobStaticRegenerate
93 ->expects($this->once())
94 ->method(
'getCacheObject')
95 ->will($this->returnValue($cacheObject));
99 ->expects($this->once())
100 ->method(
'clearMaterializedViewFiles');
102 ->expects($this->once())
103 ->method(
'clearCodeGeneratedFiles');
104 $this->jobStaticRegenerate
105 ->expects($this->exactly(2))
106 ->method(
'getCleanFilesObject')
107 ->will($this->returnValue($cleanFilesObject));
109 $this->jobStaticRegenerate->execute();
119 $modeObjectMock->expects($this->once())
121 ->will($this->throwException(
new \
Exception(
'error')));
122 $this->jobStaticRegenerate
123 ->expects($this->once())
124 ->method(
'getModeObject')
125 ->will($this->returnValue($modeObjectMock));
129 ->expects($this->once())
130 ->method(
'toggleUpdateError');
131 $this->jobStaticRegenerate
132 ->expects($this->once())
133 ->method(
'getStatusObject')
134 ->will($this->returnValue($statusObject));
136 $this->jobStaticRegenerate->execute();
156 return $this->createPartialMock(\
Magento\Deploy\Model\Filesystem::class,
$methods);
196 return $this->getMockForAbstractClass(\Symfony\Component\Console\Output\OutputInterface::class);
206 return $this->createPartialMock(\
Magento\Deploy\Model\Mode::class,
$methods);
getCacheObjectMock($methods=null)
getModeObjectMock($methods=null)
getJobStaticRegenerateMock($methods=null)
getStatusObjectMock($methods=null)
getFilesystemObjectMock($methods=null)
testExecuteWithException()
testExecuteProductionMode()
getCleanFilesObjectMock($methods=null)
testExecuteDevelopernMode()