FreshRSS is tested with PHPUnit. No code should be merged in
edge if the tests don’t pass.
As a developer, you can run the test suite on your PC easily with
make commands. You can run the test suite with:
This command downloads the PHPUnit binary and verifies its checksum. If the verification fails, the file is deleted. In this case, you should open an issue on GitHub to let maintainers know about the problem.
Then, it executes PHPUnit in a Docker container. If you don’t use Docker, you can run the command directly with:
NO_DOCKER=true make test
The linter can be run with a
make command as well:
make lint # to execute the linter on the PHP files make lint-fix # or, to fix the errors detected by the linter
Similarly to PHPUnit, it downloads a PHP_CodeSniffer binary (i.e.
phpcbf depending on the command) and verifies its checksum.
Tests are automatically run when you open a pull request on GitHub. It is done with Travis CI. This is done to ensure there is no regressions in your code. We cannot merge a PR if the tests fail so we’ll ask you to fix bugs before to review your code.
If you’re interested in, you can take a look at the configuration file.