FriendsOfBehat / SymfonyExtension

:musical_score: Extension integrating Behat with Symfony.
MIT License
472 stars 62 forks source link

[Symfony 4.3] Allow AbstractBrowser instance next to Client as test.client service #81

Closed Devristo closed 5 years ago

Devristo commented 5 years ago

Thanks for this cool extension!

The SymfonyDriver uses test.client. In Symfony 4.3 test.client is an instance of \Symfony\Bundle\FrameworkBundle\KernelBrowser which is no longer a descendant of \Symfony\Component\BrowserKit\Client but of \Symfony\Component\BrowserKit\AbstractBrowser.

This PR works around this by checking whether test.client is either a Client or AbstractBrowser.

Devristo commented 5 years ago

Unfortunately Mink's BrowserKitDriver has to be altered as well. Had done this locally, but forgot about it when creating this MR.