}
public function testAddressFormat() {
- $contact = $this->callAPISuccess('contact', 'create', array(
+ $contact = $this->callAPISuccess('contact', 'create', [
'first_name' => 'Micky',
'last_name' => 'mouse',
'contact_type' => 'Individual',
- ));
- $address = $this->callAPISuccess('address', 'create', array(
+ ]);
+ $address = $this->callAPISuccess('address', 'create', [
'street_address' => '1 Happy Place',
'city' => 'Miami',
'state_province' => 'Flordia',
'contact_id' => $contact['id'],
'location_type_id' => 5,
'is_primary' => 1,
- ));
+ ]);
$addressDetails = $address['values'][$address['id']];
$countries = CRM_Core_PseudoConstant::country();
$addressDetails['country'] = $countries[$addressDetails['country_id']];
* and test using alternate names for state_province field
*/
public function testStateProvinceFormattedBillingAddress() {
- $params = array(
+ $params = [
'billing_street_address-99' => '123 Happy Place',
'billing_city-99' => 'Miami',
'billing_postal_code-99' => 33101,
// 1000 => Alabama (AL)
'state_province-99' => '1000',
'country-99' => 'United States',
- );
+ ];
// set address_format (we are only interested in state_province & state_province_name)
$addFormat = '{contact.state_province}';