Skip to content

Register custom request matcher when using bundle? #5

@Headd2k

Description

@Headd2k

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions