d01550a6dee4ce1335ef1fd4f91734209b0b28db
[WP-Plugins/glm-member-db-registrations.git] /
1 <?php
2 use PayPal\Exception\PPConnectionException;
3 /**
4  * Test class for PPConnectionException.
5  *
6  */
7 class PPConnectionExceptionTest extends \PHPUnit_Framework_TestCase
8 {
9     /**
10      * @var PPConnectionException
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 = new PPConnectionException('http://testURL', 'test message');
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      * @test
33      */
34     public function testGetUrl()
35     {
36         $this->assertEquals('http://testURL',$this->object->getUrl());
37     }
38     /**
39      * @test
40      */
41  public function testPPConnectionException()
42     {
43         $this->setExpectedException('PayPal\Exception\PPConnectionException');
44         throw new PPConnectionException('http://testURL','Test msg PPConnectionException');
45         
46     }
47 }
48 ?>