File tree Expand file tree Collapse file tree 4 files changed +12
-8
lines changed
Process/Deploy/InstallUpdate
Test/Unit/Process/Deploy/InstallUpdate Expand file tree Collapse file tree 4 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ public function execute()
112
112
}
113
113
114
114
try {
115
+ $ this ->shell ->execute ("echo 'Installation time: '$(date) " );
115
116
$ this ->shell ->execute (sprintf (
116
117
'/bin/bash -c "set -o pipefail; %s | tee -a %s" ' ,
117
118
escapeshellcmd ($ command ),
Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ public function execute()
96
96
97
97
$ this ->logger ->info ('Running setup upgrade. ' );
98
98
99
+ $ this ->shell ->execute ("echo 'Upgrading time: '$(date) " );
99
100
$ this ->shell ->execute (sprintf (
100
101
'/bin/bash -c "set -o pipefail; %s | tee -a %s" ' ,
101
102
'php ./bin/magento setup:upgrade --keep-generated --ansi --no-interaction ' . $ verbosityLevel ,
Original file line number Diff line number Diff line change @@ -184,18 +184,19 @@ public function testExecute(
184
184
. ' --admin-firstname= \'' . $ adminFirstnameExpected . '\' --admin-lastname= \'' . $ adminLastnameExpected
185
185
. '\' --admin-email= \'' . $ adminEmail . '\' --admin-password= \'' . $ adminPasswordExpected . '\''
186
186
: '' ;
187
- $ this ->shellMock ->expects ($ this ->once ( ))
187
+ $ this ->shellMock ->expects ($ this ->exactly ( 2 ))
188
188
->method ('execute ' )
189
- ->with (
190
- '/bin/bash -c "set -o pipefail; '
189
+ ->withConsecutive (
190
+ ["echo 'Installation time: '$(date) " ],
191
+ ['/bin/bash -c "set -o pipefail; '
191
192
. ' php ./bin/magento setup:install -n --session-save=db --cleanup-database --currency= \'USD \''
192
193
. ' --base-url= \'http://unsecure.url \' --base-url-secure= \'https://secure.url \' --language= \'fr_FR \''
193
194
. ' --timezone=America/Los_Angeles --db-host= \'localhost \' --db-name= \'magento \' --db-user= \'user \''
194
195
. ' --backend-frontname= \'' . $ adminUrlExpected . '\''
195
196
. $ adminCredential
196
197
. ' --use-secure-admin=1 --ansi --no-interaction '
197
198
. ' --db-password= \'password \' -v '
198
- . ' | tee -a ' . $ installUpgradeLog . '" '
199
+ . ' | tee -a ' . $ installUpgradeLog . '" ' ]
199
200
);
200
201
201
202
$ this ->process ->execute ();
Original file line number Diff line number Diff line change @@ -105,12 +105,13 @@ public function testExecute()
105
105
$ this ->flagManagerMock ->expects ($ this ->exactly (2 ))
106
106
->method ('delete ' )
107
107
->with (FlagManager::FLAG_REGENERATE );
108
- $ this ->shellMock ->expects ($ this ->once ( ))
108
+ $ this ->shellMock ->expects ($ this ->exactly ( 2 ))
109
109
->method ('execute ' )
110
- ->with (
111
- '/bin/bash -c "set -o pipefail; php ./bin/magento setup:upgrade '
110
+ ->withConsecutive (
111
+ ["echo 'Upgrading time: '$(date) " ],
112
+ ['/bin/bash -c "set -o pipefail; php ./bin/magento setup:upgrade '
112
113
. '--keep-generated --ansi --no-interaction -v | tee -a '
113
- . $ installUpgradeLog . '" '
114
+ . $ installUpgradeLog . '" ' ]
114
115
);
115
116
$ this ->loggerMock ->expects ($ this ->once ())
116
117
->method ('info ' )
You can’t perform that action at this time.
0 commit comments