forked from LiveCarta/PayPal-PHP-SDK
Removed Deprecated Getter and Setters
- Removed Deprecated Getter Setters from all Model Classes - All Camelcase getters and setters are removed. Please use first letter uppercase syntax - E.g. instead of using get_notify_url(), use getNotifyUrl() instead
This commit is contained in:
@@ -69,71 +69,4 @@ class BillingInfoTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals($obj->getPhone(), PhoneTest::getObject());
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testSerializationDeserialization
|
||||
* @param BillingInfo $obj
|
||||
*/
|
||||
public function testDeprecatedGetters($obj)
|
||||
{
|
||||
$this->assertEquals($obj->getFirst_name(), "TestSample");
|
||||
$this->assertEquals($obj->getLast_name(), "TestSample");
|
||||
$this->assertEquals($obj->getBusiness_name(), "TestSample");
|
||||
$this->assertEquals($obj->getAdditional_info(), "TestSample");
|
||||
$this->assertEquals($obj->getNotification_channel(), "TestSample");
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testSerializationDeserialization
|
||||
* @param BillingInfo $obj
|
||||
*/
|
||||
public function testDeprecatedSetterNormalGetter($obj)
|
||||
{
|
||||
|
||||
// Check for First_name
|
||||
$obj->setFirstName(null);
|
||||
$this->assertNull($obj->getFirst_name());
|
||||
$this->assertNull($obj->getFirstName());
|
||||
$this->assertSame($obj->getFirstName(), $obj->getFirst_name());
|
||||
$obj->setFirst_name("TestSample");
|
||||
$this->assertEquals($obj->getFirst_name(), "TestSample");
|
||||
|
||||
// Check for Last_name
|
||||
$obj->setLastName(null);
|
||||
$this->assertNull($obj->getLast_name());
|
||||
$this->assertNull($obj->getLastName());
|
||||
$this->assertSame($obj->getLastName(), $obj->getLast_name());
|
||||
$obj->setLast_name("TestSample");
|
||||
$this->assertEquals($obj->getLast_name(), "TestSample");
|
||||
|
||||
// Check for Business_name
|
||||
$obj->setBusinessName(null);
|
||||
$this->assertNull($obj->getBusiness_name());
|
||||
$this->assertNull($obj->getBusinessName());
|
||||
$this->assertSame($obj->getBusinessName(), $obj->getBusiness_name());
|
||||
$obj->setBusiness_name("TestSample");
|
||||
$this->assertEquals($obj->getBusiness_name(), "TestSample");
|
||||
|
||||
// Check for Additional_info
|
||||
$obj->setAdditionalInfo(null);
|
||||
$this->assertNull($obj->getAdditional_info());
|
||||
$this->assertNull($obj->getAdditionalInfo());
|
||||
$this->assertSame($obj->getAdditionalInfo(), $obj->getAdditional_info());
|
||||
$obj->setAdditional_info("TestSample");
|
||||
$this->assertEquals($obj->getAdditional_info(), "TestSample");
|
||||
|
||||
// Check for Notification_channel
|
||||
$obj->setNotificationChannel(null);
|
||||
$this->assertNull($obj->getNotification_channel());
|
||||
$this->assertNull($obj->getNotificationChannel());
|
||||
$this->assertSame($obj->getNotificationChannel(), $obj->getNotification_channel());
|
||||
$obj->setNotification_channel("TestSample");
|
||||
$this->assertEquals($obj->getNotification_channel(), "TestSample");
|
||||
|
||||
//Test All Deprecated Getters and Normal Getters
|
||||
$this->testDeprecatedGetters($obj);
|
||||
$this->testGetters($obj);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user