WIP Failing test on importing Preferred Language field using Option value label
authorSeamus Lee <seamuslee001@gmail.com>
Mon, 30 Nov 2020 07:57:43 +0000 (18:57 +1100)
committereileen <emcnaughton@wikimedia.org>
Wed, 24 Mar 2021 21:36:03 +0000 (10:36 +1300)
tests/phpunit/CRM/Contact/Import/Parser/ContactTest.php

index 07a2e21d205b277219e0d6fd2c8baa242ea77fe5..e3025cacbbf2b032218d7620aa2363f60027040b 100644 (file)
@@ -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.
    *