[5.1] Enhance tests/bootstrap.php to find autoloader in more environments #225
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes sabre-io/dav#1484
When the sabre/http unit tests are run from inside the sabre/dav repo, the https://github.com/sabre-io/http/blob/master/tests/www/connection_aborted.php code includes https://github.com/sabre-io/http/blob/master/tests/bootstrap.php
https://github.com/sabre-io/http/blob/master/tests/bootstrap.php tries to find an
autoloader.php
to run, but in that environment,autoloader.php
is actually found a few levels up - see the comments in the code for details.This enhancement to https://github.com/sabre-io/http/blob/master/tests/bootstrap.php lets
connection_aborted.php
findHTTP\Response()
and so it runs properly.The test that makes use of it now passes even when run from inside the
sabre/dav
repo - I have tried manually on my laptop.This is all a bit of a pain, but anyway, we may as well patch it up for now.