Skip to content
Snippets Groups Projects
Commit f5db6796 authored by DaveD's avatar DaveD
Browse files

see #31865 - the test can't easily be made to work without changing...

see #31865 - the test can't easily be made to work without changing getUFLocale, and still be enforcing the right thing, so remove from earlier versions so that php 7.4 runs don't complain. Test is in civi 6.0
parent 4ccd92ae
Branches
Tags
No related merge requests found
......@@ -962,32 +962,6 @@ class CRM_Core_BAO_AddressTest extends CiviUnitTestCase {
$this->assertCount(2, $checked, 'Country list incomplete');
}
public function testCountrySorting(): void {
$countries = \Civi::entity('Address')->getOptions('country_id');
$this->assertEquals('AF', $countries[0]['name']);
// Åland Islands should sort second in en_US locale
$this->assertEquals('AX', $countries[1]['name']);
$this->assertEquals('AL', $countries[2]['name']);
$this->assertEquals('ZW', array_pop($countries)['name']);
CRM_Core_I18n::singleton()->setLocale('nl_NL');
$countries = \Civi::entity('Address')->getOptions('country_id');
$this->assertEquals('AF', $countries[0]['name']);
$this->assertEquals('AL', $countries[1]['name']);
$this->assertEquals('DZ', $countries[2]['name']);
// Åland Islands
$this->assertEquals('AX', array_pop($countries)['name']);
CRM_Core_I18n::singleton()->setLocale('it_IT');
$countries = \Civi::entity('Address')->getOptions('country_id');
$this->assertEquals('AF', $countries[0]['name']);
$this->assertEquals('AL', $countries[1]['name']);
$this->assertEquals('DZ', $countries[2]['name']);
// Åland Islands
$this->assertEquals('AX', $countries[114]['name']);
$this->assertEquals('ZW', array_pop($countries)['name']);
}
/**
* Test dev/core#2379 fix - geocodes shouldn't be > 14 characters.
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment