Answer the question
In order to leave comments, you need to log in
Where to store login/password for integration unit tests in a project hosted on github?
I had to fork one PHP library on github and am finalizing it. The library uses composer and phpunit tests. There are integration tests with a third-party service (the service periodically changes the API, so these tests are really needed). In order for the tests to work, you must first register on a third-party service and enter a login / password in the tests.
Now the login/password is hardwired into the unit test file. Since the project is on github, this should be avoided.
You can move the login password to a separate file and include its contents. But, it seems to me, there should be a more beautiful solution - for example, as in Symfony: when executing composer install, a script is executed that checks parameters.yml.dist and creates parameters.yml. In symfony, a separate package is responsible for this.
I think I can pull it into the project and set it up, but then I still need to parse the yml file from the unit test, and this is another dependency. Total two "superfluous" dependencies.
Perhaps there is a best practice?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question