From 5699463add15ab619e50f52c954e630513dbec8c Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Mon, 30 Nov 2020 18:57:43 +1100 Subject: [PATCH] WIP Failing test on importing Preferred Language field using Option value label --- .../CRM/Contact/Import/Parser/ContactTest.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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. * -- 2.25.1