Details
- 
    Type:Patch 
- 
    Status: Done/Fixed
- 
    Priority:Minor 
- 
    Resolution: Fixed/Completed
- 
    Affects Version/s: 3.2.3
- 
    Fix Version/s: 3.3.alpha
- 
    Component/s: Core CiviCRM
- 
    Labels:None
Description
Currently the CRM/Core/BAO/Address.php parseStreetAddress function support just US civic address formats.
This patch provides support for putting units at the beginning of the address, in conformity with Canadian addressing formats:
2-123 Main St
It also supports the Canadian French habit of putting a comma after the street number (and suffix) and before the street type:
123, rue Principale
Finally there was a small bug that resulted in street_number_suffix being returned with a zero-length string in some cases rather than a Null value.
Also attached are PHPUnit tests for this function. Note that I ran the tests using the parseStreetAddressTest.php file. I cut and pasted its functions into the AddressTest.php file (patch attached) but haven't tested that setup.