I'm experiencing some issues on a WebTestCase using Silex: on one of my controller's action, I need a parameter passed through a normal $_GET (I have to as it's an URL, and Apaches interprets the %2F if it's outside of the query string -- see Url Variables with %2f not handled by silex for example)
Here's how my route is defined:
$controller
->get('/get', <controller action>)
->value('url', (!empty($_GET['url']) ? $_GET['url'] : false));
It works fine in browser, but it doesn't seem to be working inside a WebTestCase like this one: $_GET
stays empty...
$client = $this->createClient();
$client->request('GET', '/get?url=' . urlencode($url));
edit
I just did a quick experiment: if I do the following in my route:
$controller
->get('/get/{url}', <action>)
->assert('url', '.*');
And this in the test:
$client = $this->createClient();
$client->request('GET', '/get/' . urlencode($url));
Everything if fine, $url gets passed to the controller... but well, it doesn't work on the browser anymore as it passes through Apache.