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\CreateProfileResponse;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
use PayPal\Api\WebProfile;
/**
@@ -110,17 +110,17 @@ class WebProfileTest 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(
CreateProfileResponseTest::getJson()
));
$result = $obj->create($mockApiContext, $mockPPRestCall);
$result = $obj->create($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -129,17 +129,17 @@ class WebProfileTest 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
));
$result = $obj->update($mockApiContext, $mockPPRestCall);
$result = $obj->update($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -148,18 +148,18 @@ class WebProfileTest extends \PHPUnit_Framework_TestCase
*/
public function testPartialUpdate($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
));
$patch = array(PatchTest::getObject());
$result = $obj->partial_update($patch, $mockApiContext, $mockPPRestCall);
$result = $obj->partial_update($patch, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -168,17 +168,17 @@ class WebProfileTest 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(
WebProfileTest::getJson()
));
$result = $obj->get("profileId", $mockApiContext, $mockPPRestCall);
$result = $obj->get("profileId", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -187,17 +187,17 @@ class WebProfileTest extends \PHPUnit_Framework_TestCase
*/
public function testGetList($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(
json_encode(array(json_decode(WebProfileTest::getJson())))
));
$result = $obj->get_list($mockApiContext, $mockPPRestCall);
$result = $obj->get_list($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -206,17 +206,17 @@ class WebProfileTest extends \PHPUnit_Framework_TestCase
*/
public function testDelete($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
));
$result = $obj->delete($mockApiContext, $mockPPRestCall);
$result = $obj->delete($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}