I have a set of PHP projects, some of which depend on others. All have PHPUnit tests. All are installable via Composer, and specify their dependencies using a composer.json file. Each project has a phpunit.xml.dist file in their root, which points to a bootsrap file.
Now I have this project Foo that has a number of direct dependencies and several indirect ones. For the CI of Foo, I'd like to run all its tests, and all those of its dependencies.
Is this somehow possible to do via Composer? If not, is there some standard-ish clean way of doing this?
Download and run Composer-Setup.exe. It will install the latest Composer version and set up your PATH so that you can call composer from any directory in your command line. Note: Close your current terminal. Test usage with a new terminal: This is important since the PATH only gets loaded when the terminal starts.
PHPUnit is a unit testing framework for the PHP programming language. It is an instance of the xUnit architecture for unit testing frameworks that originated with SUnit and became popular with JUnit. PHPUnit was created by Sebastian Bergmann and its development is hosted on GitHub.
You could try composer scripts
{
"scripts": {
"test": "phpunit"
}
}
Or maybe create a makefile and then call that using composer
{
"scripts": {
"build-all": "make build-all"
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With