Open sebastianbergmann opened 5 years ago
For this to work properly, we need to know for each test to which <testsuite>
it belongs. Otherwise we cannot skip loading bootstrap scripts that are not required when, for instance, --filter
or --group
are used.
Would multiple bootstrap scripts mean the tests in the directory are iterated over once per bootstrap?
Is this still planned to be implemented? I'm actually just now running into this "issue" where it would be most ideal to have different bootstraps (unit tests don't need a db migrate/seed but the feature tests do).
Thanks!
Same here : for example, it is required for Smoke test to have a little bit of data, and nothing else fancy, so a dedicated bootstrap could be great to achieve that.
Hi.
Is there any way inside bootstrap to know which test suite is running?
Excluding hacks like $GLOBALS['argv']
It should be possible to have
<testsuite>
specific bootstrap scripts:phpunit
should loadvendor/autoload.php
,tests/integration/bootstrap.php
, andtests/edge-to-edge/bootstrap.php
.phpunit --testsuite unit
should only loadvendor/autoload.php
.phpunit --testsuite integration
should loadvendor/autoload.php
andtests/integration/bootstrap.php
.phpunit --testsuite edge-to-edge
should loadvendor/autoload.php
,tests/integration/bootstrap.php
, andtests/edge-to-edge/bootstrap.php
.Each bootstrap script, even if configured multiple times, must only be loaded once.