CRM-16101 - reminder tests: fix flapping status
[civicrm-core.git] / tests / phpunit / CRM / Core / PseudoConstantTest.php
index 9202b1b0708a08d7b435231d373ace67ad3eee63..8a01353511b16953ad6b74eb9c471351d72b1887 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 require_once 'CiviTest/CiviUnitTestCase.php';
 
@@ -32,7 +32,7 @@ require_once 'CiviTest/CiviUnitTestCase.php';
  */
 class CRM_Core_PseudoConstantTest extends CiviUnitTestCase {
 
-  function setUp() {
+  public function setUp() {
     parent::setUp();
 
     $this->loadAllFixtures();
@@ -45,7 +45,7 @@ class CRM_Core_PseudoConstantTest extends CiviUnitTestCase {
    * Assure CRM_Core_PseudoConstant::get() is working properly for a range of
    * DAO fields having a <pseudoconstant> tag in the XML schema.
    */
-  function testOptionValues() {
+  public function testOptionValues() {
 
     // Create a custom field group for testing.
     $custom_group_name = md5(microtime());
@@ -64,12 +64,14 @@ class CRM_Core_PseudoConstantTest extends CiviUnitTestCase {
       'html_type' => 'Select',
       'data_type' => 'String',
       'is_active' => TRUE,
-      'option_values' => array(array(
-        'label' => 'Foo',
-        'value' => 'foo',
-        'is_active' => 1,
-        'weight' => 0,
-      )),
+      'option_values' => array(
+        array(
+          'label' => 'Foo',
+          'value' => 'foo',
+          'is_active' => 1,
+          'weight' => 0,
+        ),
+      ),
     );
     $result = civicrm_api3('custom_field', 'create', $api_params);
     $customFieldId = $result['id'];
@@ -235,12 +237,6 @@ class CRM_Core_PseudoConstantTest extends CiviUnitTestCase {
           'sample' => 'Unsupervised',
         ),
       ),
-      'CRM_Mailing_Event_DAO_Subscribe' => array(
-        array(
-          'fieldName' => 'group_id',
-          'sample' => $group_name,
-        ),
-      ),
       'CRM_Activity_DAO_Activity' => array(
         array(
           'fieldName' => 'activity_type_id',
@@ -524,7 +520,7 @@ class CRM_Core_PseudoConstantTest extends CiviUnitTestCase {
           'sample' => $campaign_name,
         ),
       ),
-     'CRM_Pledge_DAO_PledgePayment' => array(
+      'CRM_Pledge_DAO_PledgePayment' => array(
         array(
           'fieldName' => 'currency',
           'sample' => array('USD' => 'US Dollar'),
@@ -1070,7 +1066,7 @@ class CRM_Core_PseudoConstantTest extends CiviUnitTestCase {
     }
   }
 
-  function testContactTypes() {
+  public function testContactTypes() {
     $byName = array(
       'Individual' => 'Individual',
       'Household' => 'Household',
@@ -1085,10 +1081,18 @@ class CRM_Core_PseudoConstantTest extends CiviUnitTestCase {
     $result = CRM_Contact_DAO_Contact::buildOptions('contact_type');
     $this->assertEquals($byName, $result);
     // But we can also fetch by ID
-    $result = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'contact_type', array('keyColumn' => 'id', 'labelColumn' => 'name'));
+    $result = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'contact_type', array(
+        'keyColumn' => 'id',
+        'labelColumn' => 'name',
+      ));
     $this->assertEquals($byId, $result);
     // Make sure flip param works
-    $result = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'contact_type', array('keyColumn' => 'id', 'labelColumn' => 'name', 'flip' => TRUE));
+    $result = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'contact_type', array(
+        'keyColumn' => 'id',
+        'labelColumn' => 'name',
+        'flip' => TRUE,
+      ));
     $this->assertEquals(array_flip($byId), $result);
   }
+
 }