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:
japatel
2015-01-08 22:23:58 -06:00
parent ed2a4fd41e
commit b011d17cde
150 changed files with 47 additions and 10994 deletions

View File

@@ -71,83 +71,6 @@ class MerchantPreferencesTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($obj->getCharSet(), "TestSample");
}
/**
* @depends testSerializationDeserialization
* @param MerchantPreferences $obj
*/
public function testDeprecatedGetters($obj)
{
$this->assertEquals($obj->getSetup_fee(), CurrencyTest::getObject());
$this->assertEquals($obj->getCancel_url(), "http://www.google.com");
$this->assertEquals($obj->getReturn_url(), "http://www.google.com");
$this->assertEquals($obj->getNotify_url(), "http://www.google.com");
$this->assertEquals($obj->getMax_fail_attempts(), "TestSample");
$this->assertEquals($obj->getAuto_bill_amount(), "TestSample");
$this->assertEquals($obj->getInitial_fail_amount_action(), "TestSample");
$this->assertEquals($obj->getAccepted_payment_type(), "TestSample");
$this->assertEquals($obj->getChar_set(), "TestSample");
}
/**
* @depends testSerializationDeserialization
* @param MerchantPreferences $obj
*/
public function testDeprecatedSetterNormalGetter($obj)
{
// Check for Setup_fee
$obj->setSetupFee(null);
$this->assertNull($obj->getSetup_fee());
$this->assertNull($obj->getSetupFee());
$this->assertSame($obj->getSetupFee(), $obj->getSetup_fee());
$obj->setSetup_fee(CurrencyTest::getObject());
$this->assertEquals($obj->getSetup_fee(), CurrencyTest::getObject());
// Check for Max_fail_attempts
$obj->setMaxFailAttempts(null);
$this->assertNull($obj->getMax_fail_attempts());
$this->assertNull($obj->getMaxFailAttempts());
$this->assertSame($obj->getMaxFailAttempts(), $obj->getMax_fail_attempts());
$obj->setMax_fail_attempts("TestSample");
$this->assertEquals($obj->getMax_fail_attempts(), "TestSample");
// Check for Auto_bill_amount
$obj->setAutoBillAmount(null);
$this->assertNull($obj->getAuto_bill_amount());
$this->assertNull($obj->getAutoBillAmount());
$this->assertSame($obj->getAutoBillAmount(), $obj->getAuto_bill_amount());
$obj->setAuto_bill_amount("TestSample");
$this->assertEquals($obj->getAuto_bill_amount(), "TestSample");
// Check for Initial_fail_amount_action
$obj->setInitialFailAmountAction(null);
$this->assertNull($obj->getInitial_fail_amount_action());
$this->assertNull($obj->getInitialFailAmountAction());
$this->assertSame($obj->getInitialFailAmountAction(), $obj->getInitial_fail_amount_action());
$obj->setInitial_fail_amount_action("TestSample");
$this->assertEquals($obj->getInitial_fail_amount_action(), "TestSample");
// Check for Accepted_payment_type
$obj->setAcceptedPaymentType(null);
$this->assertNull($obj->getAccepted_payment_type());
$this->assertNull($obj->getAcceptedPaymentType());
$this->assertSame($obj->getAcceptedPaymentType(), $obj->getAccepted_payment_type());
$obj->setAccepted_payment_type("TestSample");
$this->assertEquals($obj->getAccepted_payment_type(), "TestSample");
// Check for Char_set
$obj->setCharSet(null);
$this->assertNull($obj->getChar_set());
$this->assertNull($obj->getCharSet());
$this->assertSame($obj->getCharSet(), $obj->getChar_set());
$obj->setChar_set("TestSample");
$this->assertEquals($obj->getChar_set(), "TestSample");
//Test All Deprecated Getters and Normal Getters
$this->testDeprecatedGetters($obj);
$this->testGetters($obj);
}
/**
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage CancelUrl is not a fully qualified URL
@@ -179,20 +102,20 @@ class MerchantPreferencesTest extends \PHPUnit_Framework_TestCase
public function testUrlValidationForCancelUrlDeprecated()
{
$obj = new MerchantPreferences();
$obj->setCancel_url(null);
$this->assertNull($obj->getCancel_url());
$obj->setCancelUrl(null);
$this->assertNull($obj->getCancelUrl());
}
public function testUrlValidationForReturnUrlDeprecated()
{
$obj = new MerchantPreferences();
$obj->setReturn_url(null);
$this->assertNull($obj->getReturn_url());
$obj->setReturnUrl(null);
$this->assertNull($obj->getReturnUrl());
}
public function testUrlValidationForNotifyUrlDeprecated()
{
$obj = new MerchantPreferences();
$obj->setNotify_url(null);
$this->assertNull($obj->getNotify_url());
$obj->setNotifyUrl(null);
$this->assertNull($obj->getNotifyUrl());
}
}