Skip to content
Snippets Groups Projects
Commit 43003df6 authored by lobo's avatar lobo
Browse files

CRM-13460 - Add is_numeric checks and test coverage

----------------------------------------
* CRM-13460: Make the numeric rule checks stricter
  http://issues.civicrm.org/jira/browse/CRM-13460
parent cd886d53
No related branches found
No related tags found
No related merge requests found
......@@ -39,24 +39,4 @@ class CRM_Utils_TypeTest extends CiviUnitTestCase {
array('-10foo', 'Positive', NULL),
);
}
/**
* @dataProvider numericDataProvider
*/
function testNumeric($inputData, $expectedResult) {
$this->assertEquals($expectedResult, CRM_Utils_Rule::numeric($inputData, $inputType));
}
function numericDataProvider() {
return array(
array(10, true),
array('145.0E+3', false),
array('10', true),
array(-10, true),
array('-10', true),
array('-10foo', false),
);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment