From b99f96164d7fd8bdaae55f803979f2891cc4aa97 Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 25 Sep 2015 09:34:17 +1200 Subject: [PATCH] API tests: add test to see if preferred language works --- tests/phpunit/api/v3/ContactTest.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/phpunit/api/v3/ContactTest.php b/tests/phpunit/api/v3/ContactTest.php index 542564a0a9..bb419aa367 100644 --- a/tests/phpunit/api/v3/ContactTest.php +++ b/tests/phpunit/api/v3/ContactTest.php @@ -111,6 +111,23 @@ class api_v3_ContactTest extends CiviUnitTestCase { ); } + /** + * Test civicrm_contact_create. + * + * Verify that preferred language can be set. + */ + public function testAddCreateIndividualWithPreferredLanguage() { + $params = array( + 'first_name' => 'abc1', + 'contact_type' => 'Individual', + 'last_name' => 'xyz1', + 'preferred_language' => 'es_ES', + ); + + $contact = $this->callAPISuccess('contact', 'create', $params); + $this->getAndCheck($params, $contact['id'], 'Contact'); + } + /** * Test civicrm_contact_create with sub-types. * -- 2.25.1