This repository has been archived on 2026-04-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
PayPal-PHP-SDK/tests/PayPal/Test/Api/CountryCodeTest.php

56 lines
1.2 KiB
PHP

<?php
namespace PayPal\Test\Api;
use PayPal\Api\CountryCode;
use PHPUnit\Framework\TestCase;
/**
* Class CountryCode
*
* @package PayPal\Test\Api
*/
class CountryCodeTest extends TestCase
{
/**
* Gets Json String of Object CountryCode
* @return string
*/
public static function getJson()
{
return '{"country_code":"TestSample"}';
}
/**
* Gets Object Instance with Json data filled in
* @return CountryCode
*/
public static function getObject()
{
return new CountryCode(self::getJson());
}
/**
* Tests for Serialization and Deserialization Issues
* @return CountryCode
*/
public function testSerializationDeserialization()
{
$obj = new CountryCode(self::getJson());
$this->assertNotNull($obj);
$this->assertNotNull($obj->getCountryCode());
$this->assertEquals(self::getJson(), $obj->toJson());
return $obj;
}
/**
* @depends testSerializationDeserialization
* @param CountryCode $obj
*/
public function testGetters($obj)
{
$this->assertEquals($obj->getCountryCode(), "TestSample");
}
}