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/Rest/ApiContextTest.php
2015-04-15 11:27:52 -05:00

38 lines
794 B
PHP

<?php
use PayPal\Rest\ApiContext;
/**
* Test class for ApiContextTest.
*
*/
class ApiContextTest extends PHPUnit_Framework_TestCase
{
/**
* @var ApiContext
*/
public $apiContext;
public function setUp()
{
$this->apiContext = new ApiContext();
}
public function testGetRequestId()
{
$requestId = $this->apiContext->getRequestId();
$this->assertNotNull($requestId);
$this->assertEquals($requestId, $this->apiContext->getRequestId());
}
public function testResetRequestId()
{
$requestId = $this->apiContext->getRequestId();
$newRequestId = $this->apiContext->resetRequestId();
$this->assertNotNull($newRequestId);
$this->assertNotEquals($newRequestId, $requestId);
}
}