Initial commit

This commit is contained in:
aydiv
2013-03-06 18:42:06 +05:30
commit 69cb3c4dcb
101 changed files with 6222 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
<?php
namespace PayPal\Test\Api;
use PayPal\Api\Link;
use PayPal\Test\Constants;
class LinkTest extends \PHPUnit_Framework_TestCase {
private $link;
public static $href = "USD";
public static $rel = "1.12";
public static $method = "1.12";
public static function createLink() {
$link = new Link();
$link->setHref(self::$href);
$link->setRel(self::$rel);
$link->setMethod(self::$method);
return $link;
}
public function setup() {
$this->link = self::createLink();
}
public function testGetterSetters() {
$this->assertEquals(self::$href, $this->link->getHref());
$this->assertEquals(self::$rel, $this->link->getRel());
$this->assertEquals(self::$method, $this->link->getMethod());
}
public function testSerializeDeserialize() {
$link2 = new Link();
$link2->fromJson($this->link->toJSON());
$this->assertEquals($this->link, $link2);
}
}