Skip to content

Commit

Permalink
CRM-20508: test fix for non-ascii chars in custom field
Browse files Browse the repository at this point in the history
  • Loading branch information
Jitendra Purohit committed May 11, 2017
1 parent 53537f1 commit 65c2fd1
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/phpunit/api/v3/CustomFieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,28 @@ public function testCustomFieldCreateWithEmptyOptionGroup() {
$this->assertEquals(0, $optionValueCount);
}

/**
* Check with non-ascii labels
*/
public function testCustomFieldCreateWithNonAsciiLabel() {
$customGroup = $this->customGroupCreate(array('extends' => 'Contact', 'title' => 'select_test_group'));
$params = array(
'custom_group_id' => $customGroup['id'],
'label' => 'ôôôô',
'html_type' => 'Select',
'data_type' => 'String',
'weight' => 4,
'is_required' => 1,
'is_searchable' => 0,
'is_active' => 1,
);
$customField = $this->callAPISuccess('custom_field', 'create', $params);
$this->assertNotNull($customField['id']);
$params['label'] = 'ààà';
$customField = $this->callAPISuccess('custom_field', 'create', $params);
$this->assertNotNull($customField['id']);
}

/**
* Test custom field with existing option group.
*/
Expand Down

0 comments on commit 65c2fd1

Please sign in to comment.