minkphp / MinkBundle

Mink library integration bundle for Symfony2
MIT License
60 stars 18 forks source link

Allow visit urls with domain #19

Closed megazoll closed 13 years ago

megazoll commented 13 years ago

We have custom routing with subdomains and we want test that.

everzet commented 13 years ago
  1. You just have added a bug to the project, as SymfonyDriver should conform DriverInterface. In your case it's not
  2. SymfonyDriver is capable to do only in-kernel requests. It's Symfony2 BrowserKit limitation. If you want cross-domain requests - use GoutteDriver.
megazoll commented 13 years ago

Maybe it can extract url filtration code into a protected method, which can be overriden?

P.S. Our routing process requests with domain, without this filter tests works.

stof commented 13 years ago

@everzet it does not break the interface as the argument is optional

everzet commented 13 years ago

@stof oh, somehow missed that it has default value :-/ But anyway, adding this second argument means that you need to add it to the Mink\Session also, which is wrong, cuz only SymfonyDriver really needs it. It looks like a hack really.

everzet commented 13 years ago

@megazoll this should fix your problem: https://github.com/Behat/MinkBundle/commit/db097bafded7655359bee7037001f74efe510df0

megazoll commented 13 years ago

@everzet thanks, it's works.