87475c46fe54b319143231aa5b4a84ab561c23c4
[WP-Plugins/glm-member-db.git] /
1 <?php 
2 use PayPal\Auth\Openid\PPOpenIdAddress;
3 /**
4  * Test class for PPOpenIdAddress.
5  *
6  */
7 class PPOpenIdAddressTest extends \PHPUnit_Framework_TestCase {
8         
9         public $addr;
10
11         /**
12          * Sets up the fixture, for example, opens a network connection.
13          * This method is called before a test is executed.
14          */
15         protected function setUp() {
16                 $this->addr = new PPOpenIdAddress();
17                 $this->addr->setCountry("US")->setLocality("San Jose")
18                 ->setPostalCode("95112")->setRegion("CA")
19                 ->setStreetAddress("1, North 1'st street");
20         }
21         
22         /**
23          * Tears down the fixture, for example, closes a network connection.
24          * This method is called after a test is executed.
25          */
26         protected function tearDown()
27         {
28         }
29         
30         /**
31          * @test
32          */
33         public function testSerializationDeserialization() {                            
34                 $addrCopy = new PPOpenIdAddress();
35                 $addrCopy->fromJson($this->addr->toJson());
36                 
37                 $this->assertEquals($this->addr, $addrCopy);
38         }
39 }