From: Seamus Lee Date: Mon, 30 Nov 2020 07:57:43 +0000 (+1100) Subject: WIP Failing test on importing Preferred Language field using Option value label X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5699463add15ab619e50f52c954e630513dbec8c;hp=1214798ef57714a6983bc03bde8c69c55cc90245;p=civicrm-core.git WIP Failing test on importing Preferred Language field using Option value label --- diff --git a/tests/phpunit/CRM/Contact/Import/Parser/ContactTest.php b/tests/phpunit/CRM/Contact/Import/Parser/ContactTest.php index 07a2e21d20..e3025cacbb 100644 --- a/tests/phpunit/CRM/Contact/Import/Parser/ContactTest.php +++ b/tests/phpunit/CRM/Contact/Import/Parser/ContactTest.php @@ -526,6 +526,22 @@ class CRM_Contact_Import_Parser_ContactTest extends CiviUnitTestCase { $this->assertEquals('Y', $contact[$this->getCustomFieldName('select')]); } + /** + * Test importing in the Preferred Language Field + * + * @throws \CRM_Core_Exception + */ + public function testPreferredLanguageImport() { + $contactValues = [ + 'first_name' => 'Bill', + 'last_name' => 'Gates', + 'email' => 'bill.gates@microsoft.com', + 'nick_name' => 'Billy-boy', + 'preferred_language' => 'English (Australia)', + ]; + $this->runImport($contactValues, CRM_Import_Parser::DUPLICATE_UPDATE, CRM_Import_Parser::VALID, [NULL, NULL, 'Primary', NULL, NULL]); + } + /** * Test that the import parser adds the address to the primary location. *