minkphp / MinkBundle

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

[SymfonyDriver] removes "*.php/" from urls #34

Closed e-weimann closed 12 years ago

e-weimann commented 12 years ago

Is there a reason app_test.php is removed from the url in the visit($url) method of the SymfonyDriver class? In the documentation for the MinkBundle I found the following example for the configuration:

mink:
    base_url:   http://your-virtualhost.local/app_test.php

So I expected I could run the test against app_test.php. But when I run the test, the test is run against http://your-virtualhost.local/. Is there a way to avoid the removal of "*.php/" or overwrite the visit($url) method?

everzet commented 12 years ago

SymfonyDriver doesn't send real requests - it emulates requests to kernel directly. As a matter of fact, even http://.../ part is not used - Symfony2 test.client removes it too, using only / as path parameter to create Request object.

It doesn't matter what script (app_test.php, app.php or even app_dev.php) you put in the base_url - Symfony2 makes every request directly to kernel, using current environment and avoiding real HTTP requests.