File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,10 @@ private function prepare()
66
66
67
67
$ this ->file ->createDirectory ($ this ->directoryList ->getLog ());
68
68
69
- if ($ deployLogFileExists && !$ this ->isBuildLogApplied ($ deployLogPath , $ buildPhaseLogContent )) {
69
+ if ($ deployLogFileExists
70
+ && $ buildPhaseLogContent
71
+ && !$ this ->isBuildLogApplied ($ deployLogPath , $ buildPhaseLogContent )
72
+ ) {
70
73
$ this ->file ->filePutContents ($ deployLogPath , $ buildPhaseLogContent , FILE_APPEND );
71
74
} elseif (!$ deployLogFileExists && $ buildLogFileExists ) {
72
75
$ this ->file ->copy ($ buildPhaseLogPath , $ deployLogPath );
Original file line number Diff line number Diff line change @@ -139,6 +139,15 @@ public function executeDataProvider(): array
139
139
'deployLogFileExists ' => true ,
140
140
'fileMockFilePutContentsExpects ' => 1 ,
141
141
'fileMockCopyExpects ' => 0 ,
142
+ ],
143
+ [
144
+ 'fileMockFileGetContentsExpects ' => 0 ,
145
+ 'buildPhaseLogContent ' => '' ,
146
+ 'buildLogFileExists ' => false ,
147
+ 'deployLogContent ' => 'some log the build phase log was applied some log ' ,
148
+ 'deployLogFileExists ' => true ,
149
+ 'fileMockFilePutContentsExpects ' => 0 ,
150
+ 'fileMockCopyExpects ' => 0 ,
142
151
]
143
152
];
144
153
}
You can’t perform that action at this time.
0 commit comments