4d7cca94d4f418a25dfaa0a1ba26a4da367f9f69
[WP-Plugins/glm-member-db.git] /
1 <?php
2 use PayPal\Core\PPAPIService;
3 /**
4  * Test class for PPAPIService.
5  *
6  */
7 class PPAPIServiceTest extends \PHPUnit_Framework_TestCase
8 {
9     /**
10      * @var PPAPIService
11      */
12     protected $object;
13     
14     private $config = array(
15                 'acct1.UserName' => 'jb-us-seller_api1.paypal.com'      ,
16                 'acct1.Password' => 'WX4WTU3S8MY44S7F'  ,
17                 'acct1.Signature' =>    'AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy'      ,
18                 'acct1.AppId' =>        'APP-80W284485P519543T' ,
19                 'acct2.UserName' =>     'certuser_biz_api1.paypal.com'  ,
20                 'acct2.Password' =>     'D6JNKKULHN3G5B8A'      ,
21                 'acct2.CertPath' =>     'cert_key.pem'  ,
22                 'acct2.AppId' =>        'APP-80W284485P519543T' ,
23                 'http.ConnectionTimeOut' =>     '30'    ,
24                 'http.Retry' =>         '5'     ,
25                 'service.RedirectURL' =>        'https://www.sandbox.paypal.com/webscr&cmd='    ,
26                 'service.DevCentralURL' => 'https://developer.paypal.com'       ,
27                 'service.EndPoint.IPN' => 'https://www.sandbox.paypal.com/cgi-bin/webscr'       ,
28                 'service.EndPoint.AdaptivePayments' => 'https://svcs.sandbox.paypal.com/'       ,
29                 'service.SandboxEmailAddress' => 'platform_sdk_seller@gmail.com',
30                 'log.FileName' => 'PayPal1.log' ,
31                 'log.LogLevel' =>       'INFO'  ,
32                 'log.LogEnabled' =>     '1'     ,
33     
34     
35     );
36
37     /**
38      * Sets up the fixture, for example, opens a network connection.
39      * This method is called before a test is executed.
40      */
41     protected function setUp()
42     {
43         $this->object = new PPAPIService(null,'AdaptiveAccounts', 'SOAP', null, $this->config);
44     }
45
46     /**
47      * Tears down the fixture, for example, closes a network connection.
48      * This method is called after a test is executed.
49      */
50     protected function tearDown()
51     {
52     }
53
54     /**
55      * @test
56      */
57     public function testSetServiceName()
58     {  
59         $this->assertEquals('AdaptiveAccounts',$this->object->serviceName);
60         $this->object->setServiceName('Invoice');
61         $this->assertEquals('Invoice',$this->object->serviceName);
62     }
63
64     /**
65      * @test
66      */
67     public function testMakeRequest()
68     {
69
70     }
71 }
72 ?>