CRM_Contact_BAO_ContactType_ContactTest.testCRM19133 - Fix flaky test
authorTim Otten <totten@civicrm.org>
Fri, 14 Oct 2016 15:12:45 +0000 (16:12 +0100)
committerTim Otten <totten@civicrm.org>
Fri, 14 Oct 2016 15:19:40 +0000 (16:19 +0100)
commit65aae70e53537845f28745a9455e05f7aa122385
tree8b7279905db076aa27df38ef2872ad33d3cd9779
parent094bb7248b7e0d6f687a900d32877ffbf3f28276
CRM_Contact_BAO_ContactType_ContactTest.testCRM19133 - Fix flaky test

This test seems to involve creation of a custom-data group with a randomly
generated name. The random name sometimes begins with a number, which leads
to awkward SQL queries like:

```
INSERT INTO civicrm_value_15e5f1d45a5896753463467e8c380144_1  ( 15e5f1d45a5896753463467e8c380144_1,entity_id ) VALUES (...)
```

This patch updates `CRM_Core_BAO_CustomValueTable` to perform proper escaping on the column name.
CRM/Core/BAO/CustomValueTable.php