eda5d38b5bd9b24a5862cc8f8df14b909a9470fd
[WP-Plugins/glm-member-db-registrations.git] /
1 <?php
2 use PayPal\Core\PPConfigManager;
3 /**
4  * Test class for PPConfigManager.
5  *
6  */
7 class PPConfigManagerTest extends \PHPUnit_Framework_TestCase
8 {
9         /**
10          * @var PPConfigManager
11          */
12         protected $object;
13
14         /**
15          * Sets up the fixture, for example, opens a network connection.
16          * This method is called before a test is executed.
17          */
18         protected function setUp()
19         {
20                 $this->object = PPConfigManager::getInstance();
21         }
22
23         /**
24          * Tears down the fixture, for example, closes a network connection.
25          * This method is called after a test is executed.
26          */
27         protected function tearDown()
28         {
29         }
30
31
32
33         /**
34          * @test
35          */
36         public function testGetInstance()
37         {
38                 $instance = $this->object->getInstance();
39                 $this->assertTrue($instance instanceof PPConfigManager);
40         }
41
42         /**
43          * @test
44          */
45         public function testGetIniPrefix()
46         {
47                 $ret = $this->object->getIniPrefix();
48                 $this->assertContains('acct1', $ret);
49                 $this->assertEquals(sizeof($ret), 2);
50                 
51                 $ret = $this->object->getIniPrefix('jb-us-seller_api1.paypal.com');
52                 $this->assertEquals('acct1', $ret);
53         }
54 }
55 ?>