Skip to content
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

[5.1] Enhance tests/bootstrap.php to find autoloader in more environments #225

Merged

Conversation

phil-davis
Copy link
Contributor

@phil-davis phil-davis commented Aug 17, 2023

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 find HTTP\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.

@phil-davis phil-davis requested a review from staabm August 17, 2023 16:56
@phil-davis
Copy link
Contributor Author

When this is sorted out and merged, I will need to release sabre/http 5.1.10 so that this test code change ends up in the release package.

@phil-davis phil-davis merged commit eee8bb8 into sabre-io:5.1 Aug 18, 2023
6 checks passed
@phil-davis phil-davis deleted the enhance-tests-bootstrap-autoload branch August 18, 2023 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants