Skip to content
  • eileen's avatar
    Add unit test to date parsing on import · 1004b689
    eileen authored
    This is primarily as a demo of how to test this class.
    
    Basically extract the parts that we want to check the formatting of into manageable
    functions. I made the name on the second one pretty generic so slowly all formatting can
    be moved into it, with testing.
    
    This would include moving the various bits of work done in
    _civicrm_api3_deprecated_formatted_param
    into this function - that code really does just belong on this class as it
    is not called from anywhere else.
    
    It also does the checking, but not the formatting, for these date fields - sigh
    
    I would have liked to have made the method protected but the mucking around that required
    in the test classes didn't seem to justify it
    1004b689