setUserAgent() public method

Sets the User-Agent string on the HTTP request
public setUserAgent ( string $userAgentString )
$userAgentString string
Beispiel #1
0
 /**
  * @test
  */
 public function testUserAgent()
 {
     $ua = 'UAString';
     $o = new PayPalHttpConfig();
     $o->setUserAgent($ua);
     $curlOpts = $o->getCurlOptions();
     $this->assertEquals($ua, $curlOpts[CURLOPT_USERAGENT]);
 }