Renaming Namespaces and Organizing Classes

- Updated OpenId classes to be in API namespace
- Updated PP Naming Convention to PayPal Naming Convention
- FormatConverter Class got its own namespace
- Handlers are grouped in Handler namespace
- Samples and Tests Updated Accordingly
This commit is contained in:
japatel
2014-12-17 17:15:01 -06:00
parent 4cb951f8b2
commit 9c0827643b
246 changed files with 1067 additions and 1057 deletions

View File

@@ -2,11 +2,11 @@
namespace PayPal\Test\Api;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\PlanList;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
use PayPal\Api\Plan;
/**
@@ -140,17 +140,17 @@ class PlanTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($obj, $mockApiContext)
{
$mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
$mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
$mockPPRestCall->expects($this->any())
$mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
PlanTest::getJson()
));
$result = $obj->get("planId", $mockApiContext, $mockPPRestCall);
$result = $obj->get("planId", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -159,17 +159,17 @@ class PlanTest extends \PHPUnit_Framework_TestCase
*/
public function testCreate($obj, $mockApiContext)
{
$mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
$mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
$mockPPRestCall->expects($this->any())
$mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
$result = $obj->create($mockApiContext, $mockPPRestCall);
$result = $obj->create($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -178,18 +178,18 @@ class PlanTest extends \PHPUnit_Framework_TestCase
*/
public function testUpdate($obj, $mockApiContext)
{
$mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
$mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
$mockPPRestCall->expects($this->any())
$mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
$patchRequest = PatchRequestTest::getObject();
$result = $obj->update($patchRequest, $mockApiContext, $mockPPRestCall);
$result = $obj->update($patchRequest, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -198,18 +198,18 @@ class PlanTest extends \PHPUnit_Framework_TestCase
*/
public function testList($obj, $mockApiContext)
{
$mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
$mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
$mockPPRestCall->expects($this->any())
$mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
PlanListTest::getJson()
));
$params = ParamsTest::getObject();
$result = $obj->all($params, $mockApiContext, $mockPPRestCall);
$result = $obj->all($params, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}