forked from LiveCarta/PayPal-PHP-SDK
Enabled EC Parameters support
- Updated Api to enabled EC Parameters - Updated Tests - Updated Logging Manager - Added a feature to do validation on accessors.
This commit is contained in:
@@ -5,36 +5,41 @@ namespace PayPal\Test\Api;
|
||||
use PayPal\Api\Links;
|
||||
use PayPal\Test\Constants;
|
||||
|
||||
class LinksTest extends \PHPUnit_Framework_TestCase {
|
||||
class LinksTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
private $links;
|
||||
private $links;
|
||||
|
||||
public static $href = "USD";
|
||||
public static $rel = "1.12";
|
||||
public static $method = "1.12";
|
||||
|
||||
public static function createLinks() {
|
||||
$links = new Links();
|
||||
$links->setHref(self::$href);
|
||||
$links->setRel(self::$rel);
|
||||
$links->setMethod(self::$method);
|
||||
|
||||
return $links;
|
||||
}
|
||||
|
||||
public function setup() {
|
||||
$this->links = self::createLinks();
|
||||
}
|
||||
|
||||
public function testGetterSetters() {
|
||||
$this->assertEquals(self::$href, $this->links->getHref());
|
||||
$this->assertEquals(self::$rel, $this->links->getRel());
|
||||
$this->assertEquals(self::$method, $this->links->getMethod());
|
||||
}
|
||||
|
||||
public function testSerializeDeserialize() {
|
||||
$link2 = new Links();
|
||||
$link2->fromJson($this->links->toJSON());
|
||||
$this->assertEquals($this->links, $link2);
|
||||
}
|
||||
public static $href = "USD";
|
||||
public static $rel = "1.12";
|
||||
public static $method = "1.12";
|
||||
|
||||
public static function createLinks()
|
||||
{
|
||||
$links = new Links();
|
||||
$links->setHref(self::$href);
|
||||
$links->setRel(self::$rel);
|
||||
$links->setMethod(self::$method);
|
||||
|
||||
return $links;
|
||||
}
|
||||
|
||||
public function setup()
|
||||
{
|
||||
$this->links = self::createLinks();
|
||||
}
|
||||
|
||||
public function testGetterSetters()
|
||||
{
|
||||
$this->assertEquals(self::$href, $this->links->getHref());
|
||||
$this->assertEquals(self::$rel, $this->links->getRel());
|
||||
$this->assertEquals(self::$method, $this->links->getMethod());
|
||||
}
|
||||
|
||||
public function testSerializeDeserialize()
|
||||
{
|
||||
$link2 = new Links();
|
||||
$link2->fromJson($this->links->toJSON());
|
||||
$this->assertEquals($this->links, $link2);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user