cockyRoanyTog
New Member
I am testing my Zend Framework application using Selenium and PHPUnit. I have a test that needs to open a URL that contains an encoded URL.\[code\]$redirectToLocation = urlencode('/myothercontroller/action'); // %2Fmyothercontroller%2Faction$this->openAndWait('/controller/action/thenRedirectTo/' . $redirectToLocation);\[/code\]But when I run my test, the browser tried opening the decoded URL:\[code\]/controller/action/thenRedirectTo//myothercontroller/action\[/code\]What should I do to get selenium to open the encoded URL?Update: Actually...turns out selenium is doing it's job, but it seems as if Apache is decoding the URL before it gets to the controller:\[code\]The requested URL /controller/action/thenRedirectTo//myothercontroller/action was not found on this server.\[/code\]How should I fix this problem?Update: Here's a whole conversation about the same problem that I'm having: http://old.nabble.com/URL-Encoding-td18850769.html. Their workaround was to base64 encode the url, but that's not good enough for me. I may use this solution in the short term, but I want to know what is the real cause of this problem, so I can eliminate it.Update: I have a co-worker who thinks there may be a problem with the way Zend Framework is routing the request. Do you think that could be the case?