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

Register custom request matcher when using bundle? #5

Open
Headd2k opened this issue Jul 18, 2016 · 0 comments
Open

Register custom request matcher when using bundle? #5

Headd2k opened this issue Jul 18, 2016 · 0 comments

Comments

@Headd2k
Copy link

Headd2k commented Jul 18, 2016

hi everyone!

first of all i want to say "thank you!" for providing such a useful bundle!

we have integrated php-vcr in our phpunit testsuite and take advantage of it, when external services will be requested during our integration tests.

to match the recorded request with the requests generated during our tests, i had to provide a custom request matcher callback, as the generated requests currently contain randomly generated parameters like a token in a "back"-url.

see this gist how we use it in our phpunit bootstrap.php

https://gist.github.com/Headd2k/62f6d271a2b7890fd59a76254bcfafc9

question: how would i register such a custom request matcher when using the bundle? i would like to enable php-vcr via the bundle for our behat testsuite but i think i would need to register my custom handler to get it working with our cases.

as a workaround i think i could setup php-vcr in my app_test.php but this would make the bundle obsolete.

any ideas?

thanks in advance!

kai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants