-
-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically load the bootstrap file from phpunit? #28
Comments
Paratest should load the bootstrap from the phpunit.xml file, but currently it does not look for bootstrap.php. Is this just a matter of looking for a bootstrap.php file relative to where the command is executed? |
No I am not saying this should be automated. As you can see in the phpunit config the bootstrap file is provided, and that works well when running the tests, but I think the issue is that paratest scans the files upfront and doesn't load the bootstrap file to do so, so it fails at loading the classes before it can even start phpunit. |
I think this part is flawed here. https://github.com/brianium/paratest/blob/master/src/ParaTest/Console/Testers/PHPUnit.php#L53 I think if bootstrap is in config, it is not being passed to the options array. That might explain why --bootstrap works when provided explicitly. |
…on - This addresses paratestphp#28. If a bootstrap is specified but cannot be found, a RuntimeException is now thrown.
When running the composer test suite with paratest, you have to give it
--bootstrap=tests/bootstrap.php
or it fails to load some abstract test classes properly, and results in this:As you can see in the AutoloadGeneratorTest class extends the TestCase class. This class is made loadable via the composer autoloader in the bootstrap file, but paratest doesn't pick it up automatically it seems.
The text was updated successfully, but these errors were encountered: