Knp\Bundle\KnpBundlesBundle\Travis\Travis::setBrowser PHP Method

setBrowser() public method

public setBrowser ( Buzz\Browser $browser )
$browser Buzz\Browser
    public function setBrowser(Browser $browser)
    {
        $client = $browser->getClient();
        $client->setVerifyPeer(false);
        $client->setTimeout(30);
        if ($client instanceof \Buzz\Client\Curl) {
            $client->setOption(CURLOPT_USERAGENT, 'KnpBundles.com Bot');
        }
        $this->browser = $browser;
    }

Usage Example

Example #1
0
 private function getTravis($return = array(), $with = null)
 {
     $output = $this->getMock('Symfony\\Component\\Console\\Output\\OutputInterface');
     $travis = new Travis($output);
     $travis->setBrowser($this->getBrowserMock($return, $with));
     return $travis;
 }