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,108 +71,6 @@ class MetadataTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($obj->getPayerViewUrl(), "http://www.google.com");
}
/**
* @depends testSerializationDeserialization
* @param Metadata $obj
*/
public function testDeprecatedGetters($obj)
{
$this->assertEquals($obj->getCreated_date(), "TestSample");
$this->assertEquals($obj->getCreated_by(), "TestSample");
$this->assertEquals($obj->getCancelled_date(), "TestSample");
$this->assertEquals($obj->getCancelled_by(), "TestSample");
$this->assertEquals($obj->getLast_updated_date(), "TestSample");
$this->assertEquals($obj->getLast_updated_by(), "TestSample");
$this->assertEquals($obj->getFirst_sent_date(), "TestSample");
$this->assertEquals($obj->getLast_sent_date(), "TestSample");
$this->assertEquals($obj->getLast_sent_by(), "TestSample");
$this->assertEquals($obj->getPayer_view_url(), "http://www.google.com");
}
/**
* @depends testSerializationDeserialization
* @param Metadata $obj
*/
public function testDeprecatedSetterNormalGetter($obj)
{
// Check for Created_date
$obj->setCreatedDate(null);
$this->assertNull($obj->getCreated_date());
$this->assertNull($obj->getCreatedDate());
$this->assertSame($obj->getCreatedDate(), $obj->getCreated_date());
$obj->setCreated_date("TestSample");
$this->assertEquals($obj->getCreated_date(), "TestSample");
// Check for Created_by
$obj->setCreatedBy(null);
$this->assertNull($obj->getCreated_by());
$this->assertNull($obj->getCreatedBy());
$this->assertSame($obj->getCreatedBy(), $obj->getCreated_by());
$obj->setCreated_by("TestSample");
$this->assertEquals($obj->getCreated_by(), "TestSample");
// Check for Cancelled_date
$obj->setCancelledDate(null);
$this->assertNull($obj->getCancelled_date());
$this->assertNull($obj->getCancelledDate());
$this->assertSame($obj->getCancelledDate(), $obj->getCancelled_date());
$obj->setCancelled_date("TestSample");
$this->assertEquals($obj->getCancelled_date(), "TestSample");
// Check for Cancelled_by
$obj->setCancelledBy(null);
$this->assertNull($obj->getCancelled_by());
$this->assertNull($obj->getCancelledBy());
$this->assertSame($obj->getCancelledBy(), $obj->getCancelled_by());
$obj->setCancelled_by("TestSample");
$this->assertEquals($obj->getCancelled_by(), "TestSample");
// Check for Last_updated_date
$obj->setLastUpdatedDate(null);
$this->assertNull($obj->getLast_updated_date());
$this->assertNull($obj->getLastUpdatedDate());
$this->assertSame($obj->getLastUpdatedDate(), $obj->getLast_updated_date());
$obj->setLast_updated_date("TestSample");
$this->assertEquals($obj->getLast_updated_date(), "TestSample");
// Check for Last_updated_by
$obj->setLastUpdatedBy(null);
$this->assertNull($obj->getLast_updated_by());
$this->assertNull($obj->getLastUpdatedBy());
$this->assertSame($obj->getLastUpdatedBy(), $obj->getLast_updated_by());
$obj->setLast_updated_by("TestSample");
$this->assertEquals($obj->getLast_updated_by(), "TestSample");
// Check for First_sent_date
$obj->setFirstSentDate(null);
$this->assertNull($obj->getFirst_sent_date());
$this->assertNull($obj->getFirstSentDate());
$this->assertSame($obj->getFirstSentDate(), $obj->getFirst_sent_date());
$obj->setFirst_sent_date("TestSample");
$this->assertEquals($obj->getFirst_sent_date(), "TestSample");
// Check for Last_sent_date
$obj->setLastSentDate(null);
$this->assertNull($obj->getLast_sent_date());
$this->assertNull($obj->getLastSentDate());
$this->assertSame($obj->getLastSentDate(), $obj->getLast_sent_date());
$obj->setLast_sent_date("TestSample");
$this->assertEquals($obj->getLast_sent_date(), "TestSample");
// Check for Last_sent_by
$obj->setLastSentBy(null);
$this->assertNull($obj->getLast_sent_by());
$this->assertNull($obj->getLastSentBy());
$this->assertSame($obj->getLastSentBy(), $obj->getLast_sent_by());
$obj->setLast_sent_by("TestSample");
$this->assertEquals($obj->getLast_sent_by(), "TestSample");
//Test All Deprecated Getters and Normal Getters
$this->testDeprecatedGetters($obj);
$this->testGetters($obj);
}
/**
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage PayerViewUrl is not a fully qualified URL