1

Whatever I do, I always get a

Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for [...]"

in $crawler->text(), when I try to request an external URL with $crawler = $client->request('GET', 'http://anotherdomain.com');.

I want to do that because I'm using another virtualHost to render some pages with Symfony 1.2 and some others with Symfony 2.3.

I also tried to

$client = static::createClient(array(), array('HTTP_HOST' => 'anotherdomain.com'));
$client->followRedirects(true);

But it's always trying to render it whithin Symfony 2.

1 Answer 1

5

It's not possible, because $client actually doesn't send any http request (you may notice that when you try run your "functional" test with www server disabled - they still should work). Instead of that it simulates http request and run normal Symfony's dispatching.

1
  • Thanks, that's what I suspected !
    – Bonswouar
    Commented Jul 16, 2013 at 7:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.