- 🇷🇺Russia niklan Russia, Perm
Finally, found reliable solution for Drupal4Drupal environment.
Add new environment variables for
php
container indocker-compose.yml
:php: image: wodby/php:$PHP_TAG container_name: "${PROJECT_NAME}_php" environment: … PHP_FPM_USER: wodby PHP_FPM_GROUP: wodby
Then rebuild container by
docker-compose up -d --no-deps --build php
and that's it/ All tests, including Functional, will be run without needing usingsudo
or anything else. They just run as expected, even from PHPStorm. - 🇺🇦Ukraine quadrexdev Lutsk
Thanks @Niklan!
I was struggling with this issue but your solution works like a charm.
- 🇷🇺Russia Chi
One possible solution is setting directory permissions manually.
The attached patch assumes you have the following configuration in settings.php file.
if ($_SERVER['DRUPAL_FUNCTIONAL_TEST'] ?? FALSE) { $settings['file_chmod_directory'] = 0777; }
Note, you will still need to set permissions for
sites/simpletest/browser_output directory
. Also ensure access to SQLite database. - 🇷🇺Russia Chi
Actually, it's better to follow #53 🐛 Running any tests which extended from BrowserTestBase getting permission denied Fixed but use
testing.settings.php
file instead.$settings['file_chmod_directory'] = 02777;
- 🇳🇱Netherlands Martijn Houtman
For me, it was the permission hardening that was setting the simpletest directory to 0555. Simply adding this to default.settings.php worked:
```
$settings['skip_permissions_hardening'] = TRUE;
```