Inheritance: extends PPGenericServiceHandler
コード例 #1
0
 /**
  * @test
  */
 public function testSourceHeader()
 {
     $httpConfig = new PPHttpConfig();
     $handler = new PPPlatformServiceHandler(null, 'sdkname', 'sdkversion');
     $handler->handle($httpConfig, new PPRequest(new StdClass(), 'NV'), $this->options);
     $headers = $httpConfig->getHeaders();
     $this->assertArrayHasKey('X-PAYPAL-REQUEST-SOURCE', $headers);
     $this->assertRegExp('/.*sdkname.*/', $headers['X-PAYPAL-REQUEST-SOURCE']);
     $this->assertRegExp('/.*sdkversion.*/', $headers['X-PAYPAL-REQUEST-SOURCE']);
 }