-
-
Notifications
You must be signed in to change notification settings - Fork 861
feat: add documentation on how to run tests #842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest adding a link to the documentation on installing PHPUnit into a project (this document assumes it is installed).
Also this repository already has a document on using Makefile in a project. Maybe add a link to it and rely on its extension rather than writing a separate Makefile?
## I want to run tests on my server | ||
|
||
Simple: you only need to set up and deploy you project the same way as for the dev environment, | ||
but you will need to set APP_ENV to test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but you will need to set APP_ENV to test. | |
but you will need to set `APP_ENV` to test. |
You can set this value in `compose.override.yaml` directly, or provide your environment values | ||
with a specific `env-file`: | ||
|
||
```bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```bash | |
```console |
See #544
(check out [Automating your Workflow with a Makefile](https://symfony.com/doc/current/the-fast-track/en/17-tests.html#automating-your-workflow-with-a-makefile)). | ||
You can start from this template: | ||
|
||
```makefile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```makefile | |
```Makefile |
See
symfony-docker/docs/makefile.md
Line 42 in afd9810
```Makefile |
`dev` environment. That's not ideal for unit tests, and clearly bad if you run | ||
tests against your database. | ||
|
||
The solution is to use a Makefile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it would be better to write "one of the possible solutions"?
Closing: refer to https://symfony.com/doc/current/testing.html if you need some documentation about testing, and check your configuration if you have issues. |
Related to #836
cc @7-zete-7