spatie / phpunit-snapshot-assertions

A way to test without writing actual test cases
https://spatie.be/courses/testing-laravel-with-pest/snapshot-testing
MIT License
640 stars 70 forks source link

Make it usable with docker container #197

Closed Niolak closed 4 months ago

Niolak commented 4 months ago

In our projects, we launch phpunit in a docker container.

User in the docker container is not the same as user in developers laptops. This means that currently the snapshots folders and files cannot be pulled/pushed to git repository without changing permissions manually.

Setting permissions to 777 to folders and files with chmod solves this problem. (mkdir recursively does not take into account the permission for all the files/folders so it's necessary to chmod folders afterwards)

freekmurze commented 4 months ago

We'll continue this in the PRs