Validation Package Testing

- Added More Unit Tests to Validation Classes
- Updated Logic accordingly
This commit is contained in:
japatel
2015-01-09 16:56:38 -06:00
parent 095ab24b62
commit f7cfd0faa9
6 changed files with 170 additions and 9 deletions

View File

@@ -24,6 +24,10 @@ class ModelAccessorValidator
{
$mode = PayPalConfigManager::getInstance()->get('validation.level');
if ($mode != 'disabled') {
//Check if $attributeName is string
if (gettype($attributeName) !== 'string') {
return false;
}
//If the mode is disabled, bypass the validation
foreach (array('set' . $attributeName, 'get' . $attributeName) as $methodName) {
if (get_class($class) == get_class(new PayPalModel())) {