2 use PayPal\Auth\Openid\PPOpenIdTokeninfo;
4 * Test class for PPOpenIdTokeninfo.
7 class PPOpenIdTokeninfoTest extends \PHPUnit_Framework_TestCase {
12 * Sets up the fixture, for example, opens a network connection.
13 * This method is called before a test is executed.
15 protected function setUp() {
16 $this->token = new PPOpenIdTokeninfo();
17 $this->token->setAccessToken("Access token")
19 ->setRefreshToken("Refresh token")
20 ->setScope("openid address")
21 ->setTokenType("Bearer");
25 * Tears down the fixture, for example, closes a network connection.
26 * This method is called after a test is executed.
28 protected function tearDown()
35 public function testSerializationDeserialization() {
36 $tokenCopy = new PPOpenIdTokeninfo();
37 $tokenCopy->fromJson($this->token->toJson());
39 $this->assertEquals($this->token, $tokenCopy);