This plugin uses a special sandbox which allows it to run composer as a separate process during testing which creates:
- Fake local composer repository in
/repo/packages.json
with all packages defined package fixtures. - Isolated
COMPOSER_HOME
with configuration in/composer/config.json
that disabled packagist and configures the above repository. - Project directories in
/project/{test_run}
used for storing dynamically constructed project used for testing.
See the ComposerSandbox class for the details.
Just start vendor/bin/phpunit
.
If you want to see the output of commands executed during functional testing use the --debug
switch:
vendor/bin/phpunit --debug
It's nice to also add the --testdox
switch then.
Path to base directory used to store temporary files needed for running the tests.
Warning! Never place
TEST_TMP
dir inside your project's working tree as this will cause composer to attempt recursively install its own files and all hell breaks loose.
Path to php used for running composer.
Path to composer binary to use for running the tests.
String that will be appended to every invocation of composer command.
Warning! Arguments passed through env vars must must be space-delimited and each argument cannot contain space characters even if they are escaped.
If enabled sandbox directories of failed tests are preserved and composer command output is flushed for every test.
Do not remove the directory after running a test.