File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
dev/tests/functional/tests/app/Magento/Install/Test/Constraint
setup/src/Magento/Setup/Controller Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ class AssertSuccessfulReadinessCheck extends AbstractConstraint
27
27
/**
28
28
* File permission message.
29
29
*/
30
- const FILE_PERMISSION_REGEXP = 'File permissions does not meet requirements. ' ;
30
+ const FILE_PERMISSION_REGEXP = '/You meet (\d+) out of \1 writable file permission requirements\./ ' ;
31
31
32
32
/**
33
33
* Assert that PHP Version, PHP Extensions and File Permission are ok.
@@ -47,7 +47,7 @@ public function processAssert(Install $installPage)
47
47
$ installPage ->getReadinessBlock ()->getPhpExtensionsCheck (),
48
48
'PHP extensions missed. '
49
49
);
50
- \PHPUnit_Framework_Assert::assertContains (
50
+ \PHPUnit_Framework_Assert::assertRegExp (
51
51
self ::FILE_PERMISSION_REGEXP ,
52
52
$ installPage ->getReadinessBlock ()->getFilePermissionCheck (),
53
53
'File permissions does not meet requirements. '
Original file line number Diff line number Diff line change @@ -162,18 +162,24 @@ public function filePermissionsAction()
162
162
$ responseType = ResponseTypeInterface::RESPONSE_TYPE_SUCCESS ;
163
163
$ missingWritePermissionPaths = $ this ->permissions ->getMissingWritablePathsForInstallation (true );
164
164
165
+ $ currentPaths = [];
165
166
$ requiredPaths = [];
166
167
if ($ missingWritePermissionPaths ) {
167
- $ responseType = ResponseTypeInterface::RESPONSE_TYPE_ERROR ;
168
168
foreach ($ missingWritePermissionPaths as $ key => $ value ) {
169
- $ requiredPaths [] = ['path ' => $ key , 'missing ' => $ value ];
169
+ if (is_array ($ value )) {
170
+ $ requiredPaths [] = ['path ' => $ key , 'missing ' => $ value ];
171
+ $ responseType = ResponseTypeInterface::RESPONSE_TYPE_ERROR ;
172
+ } else {
173
+ $ requiredPaths [] = ['path ' => $ key ];
174
+ $ currentPaths [] = $ key ;
175
+ }
170
176
}
171
177
}
172
178
$ data = [
173
179
'responseType ' => $ responseType ,
174
180
'data ' => [
175
181
'required ' => $ requiredPaths ,
176
- 'current ' => $ this -> permissions -> getInstallationCurrentWritableDirectories () ,
182
+ 'current ' => $ currentPaths ,
177
183
],
178
184
];
179
185
You can’t perform that action at this time.
0 commit comments