@@ -101,78 +101,19 @@ public function testExecute()
101
101
['Generating static content for locales: en_GB fr_FR ' ],
102
102
['Maintenance mode is disabled. ' ]
103
103
);
104
- $ this ->environmentMock ->expects ($ this ->exactly (2 ))
105
- ->method ('getAdminLocale ' )
106
- ->willReturn ('fr_FR ' );
107
- $ this ->shellMock ->method ('execute ' )
104
+ $ this ->commandMock ->expects ($ this ->once ())
105
+ ->method ('create ' )
106
+ ->willReturn ('php ./bin/magento static:content:deploy:command ' );
107
+ $ this ->shellMock ->expects ($ this ->exactly (3 ))
108
+ ->method ('execute ' )
108
109
->withConsecutive (
109
110
['php ./bin/magento maintenance:enable -vvv ' ],
110
- ['php ./bin/magento setup: static- content:deploy -f en_GB fr_FR -vvv -s compact ' ],
111
+ ['php ./bin/magento static: content:deploy:command ' ],
111
112
['php ./bin/magento maintenance:disable -vvv ' ]
112
113
);
113
114
$ this ->environmentMock ->method ('getVerbosityLevel ' )
114
115
->willReturn (' -vvv ' );
115
116
116
117
$ this ->process ->execute ();
117
118
}
118
-
119
- public function testExecuteEmptyLocales ()
120
- {
121
- $ this ->directoryListMock ->method ('getMagentoRoot ' )
122
- ->willReturn ('magento_root ' );
123
- $ this ->fileMock ->expects ($ this ->once ())
124
- ->method ('touch ' )
125
- ->with ('magento_root/pub/static/deployed_version.txt ' );
126
- $ this ->loggerMock ->method ('notice ' )
127
- ->withConsecutive (
128
- ['Enabling Maintenance mode ' ],
129
- ['Extracting locales ' ],
130
- ['Generating static content for locales: fr_FR ' ],
131
- ['Maintenance mode is disabled. ' ]
132
- );
133
- $ this ->environmentMock ->expects ($ this ->exactly (2 ))
134
- ->method ('getAdminLocale ' )
135
- ->willReturn ('fr_FR ' );
136
- $ this ->shellMock ->method ('execute ' )
137
- ->withConsecutive (
138
- ['php ./bin/magento maintenance:enable -vvv ' ],
139
- ['php ./bin/magento setup:static-content:deploy -f fr_FR -vvv -s compact ' ],
140
- ['php ./bin/magento maintenance:disable -vvv ' ]
141
- );
142
- $ this ->environmentMock ->method ('getVerbosityLevel ' )
143
- ->willReturn (' -vvv ' );
144
-
145
- $ this ->process ->execute ();
146
- }
147
-
148
- public function testExecuteExcludedThemes ()
149
- {
150
- $ this ->directoryListMock ->method ('getMagentoRoot ' )
151
- ->willReturn ('magento_root ' );
152
- $ this ->fileMock ->expects ($ this ->once ())
153
- ->method ('touch ' )
154
- ->with ('magento_root/pub/static/deployed_version.txt ' );
155
- $ this ->loggerMock ->method ('info ' )
156
- ->withConsecutive (
157
- ['Enabling Maintenance mode ' ],
158
- ['Extracting locales ' ],
159
- ['Generating static content for locales: en_GB fr_FR ' ],
160
- ['Maintenance mode is disabled. ' ]
161
- );
162
- $ this ->environmentMock ->expects ($ this ->exactly (2 ))
163
- ->method ('getAdminLocale ' )
164
- ->willReturn ('fr_FR ' );
165
- $ this ->shellMock ->method ('execute ' )
166
- ->withConsecutive (
167
- ['php ./bin/magento maintenance:enable -vvv ' ],
168
- ['php ./bin/magento setup:static-content:deploy -f --exclude-theme=en_GB en_GB fr_FR -vvv ' ],
169
- ['php ./bin/magento maintenance:disable -vvv ' ]
170
- );
171
- $ this ->environmentMock ->method ('getVerbosityLevel ' )
172
- ->willReturn (' -vvv ' );
173
- $ this ->environmentMock ->method ('getStaticDeployExcludeThemes ' )
174
- ->willReturn ('en_GB ' );
175
-
176
- $ this ->process ->execute ();
177
- }
178
119
}
0 commit comments