3 namespace PayPal\Test\Api;
6 use PayPal\Test\Constants;
8 class LinksTest extends \PHPUnit_Framework_TestCase {
12 public static $href = "USD";
13 public static $rel = "1.12";
14 public static $method = "1.12";
16 public static function createLinks() {
18 $links->setHref(self::$href);
19 $links->setRel(self::$rel);
20 $links->setMethod(self::$method);
25 public function setup() {
26 $this->links = self::createLinks();
29 public function testGetterSetters() {
30 $this->assertEquals(self::$href, $this->links->getHref());
31 $this->assertEquals(self::$rel, $this->links->getRel());
32 $this->assertEquals(self::$method, $this->links->getMethod());
35 public function testSerializeDeserialize() {
37 $link2->fromJson($this->links->toJSON());
38 $this->assertEquals($this->links, $link2);