Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Provide a way to configure the Goutte driver #58

Open
elnur opened this issue Mar 8, 2014 · 11 comments
Open

Provide a way to configure the Goutte driver #58

elnur opened this issue Mar 8, 2014 · 11 comments

Comments

@elnur
Copy link

elnur commented Mar 8, 2014

Right now, it's not possible to configure Goutte/Guzzle/cURL to ignore SSL errors.

@66Ton99
Copy link
Contributor

66Ton99 commented Apr 8, 2014

Does MinkGoutteDriver support it?

@66Ton99
Copy link
Contributor

66Ton99 commented May 14, 2014

@elnur I can't do it here if MinkGoutteDriver does not support this configuration

@stof
Copy link
Member

stof commented May 14, 2014

@66Ton99 MinkGoutteDriver accepts a Goutte client in its constructor, so you can configure it the way you want

@elnur
Copy link
Author

elnur commented May 14, 2014

That's the way I'm doing it now. I subclass Behat\Mink\Driver\Goutte\Client and activate it the following way:

parameters:
    mink.goutte.class: Acme\Goutte\Client

But it would be nice to have a configuration option for such a common use case. Mink extension for Behat supports it, but Mink itself doesn't. That's another example of the Behat/Mink confusion.

@stof
Copy link
Member

stof commented May 15, 2014

@elnur Mink itself supports configuring goutte (otherwise MinkExtension could not support it). The issue is only in MinkBundle.
And MinkBundle is actually a wrong tool for the job. It is integrating Mink into Symfony for the purpose of integrating it with PHPUnit actually. this is because it is from the old days were Behat was integrated the same way by BehatBundle before Behat had extensions). To use Mink in PHPUnit, I suggest using https://github.com/aik099/phpunit-mink instead (maintained by a core dev of Mink)

@elnur
Copy link
Author

elnur commented May 15, 2014

@stof For me the whole point of using the Mink bundle is to integrate with the Symfony DIC. I don't see a way to do that with PHPUnit-Mink — at least not an obvious one.

@stof
Copy link
Member

stof commented May 15, 2014

but the point is that there is no valid reason to use Mink in your DIC. It is not meant to be used inside your app. It is meant to be used in your testsuite to test your app

@elnur
Copy link
Author

elnur commented May 15, 2014

How am I supposed to populate test data in the database and assert it after
interacting with the UI without the container then?

@elnur
Copy link
Author

elnur commented May 15, 2014

Hmm. I guess I could do it by extending KernelTestCase.

@stof
Copy link
Member

stof commented May 15, 2014

yeah, the issue is that PHPUnit does not allow using several extensions at the same time, given that the common way to write a phpunit extension is to provide a base testcase class.

@elnur
Copy link
Author

elnur commented May 15, 2014

Seems like I need to extend BrowserTestCase in aik099/phpunit-mink. Therefore I won't be able to extend KernelTestCase. This bundle still looks like a better solution.

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

No branches or pull requests

3 participants