Lukas, I believe that parameters are taken from the superglobal $_GET, as symfony doesn't parse the query string manually. So you should either set the there or instantiate an instance of Request with all the query parameters an pass that to the client.
Sent from my Nexus One On Oct 23, 2010 4:54 AM, "Lukas Kahwe Smith" <[email protected]> wrote: > Hi, > > I am trying to create a functional test to a controller and pass a GET parameter along: > $client = $this->createClient(array('environment' => 'test')); > $client->request('GET', '/foo?ding=dong'); > $this->assertContains('dong, $client->getResponse()->getContent()); > > However when I then do something like the following in my controller: > $content = $this->request->query->get('foo', 'nofoo'); > $this->response->setContent($content); > return $this->response; > > I get a failed test. I tried to debug it once with step by step debugging, but I just couldn't figure out at what point the parameters are lost. > > Interestingly when I was using the controller_resolver service's forward() method I had the same issue that query parameters would get lost before reaching the controller. Am I just missing something? Does this all work for you guys? Is my symfony fork just foo bar? > > regards, > Lukas Kahwe Smith > [email protected] > > > > -- > If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<symfony-devs%[email protected]> > For more options, visit this group at > http://groups.google.com/group/symfony-devs?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
