Question

I could not find any matching method in sfTestFunctional or sfBrowser to set the UserAgent string. Maybe it's not possible because it goes through php-cli?

Was it helpful?

Solution

$browser->setHttpHeader('User-Agent', 'some custom string')->get('your url') This sets the user agent for the next request, so maybe you want to extend the sfBrowser object to provide the HTTP headers on every request

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top