Coding standards cleanup sprint.
[civicrm-core.git] / tests / phpunit / api / v3 / UFFieldTest.php
index 60d37a7146af5e9fe4008f692f1719abc18ad60a..03a84e3265d4d0d34df879aeb39f9d544f93fbbb 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -60,7 +60,7 @@ class api_v3_UFFieldTest extends CiviUnitTestCase {
     $op = new PHPUnit_Extensions_Database_Operation_Insert;
     $op->execute(
       $this->_dbconn,
-      new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet(dirname(__FILE__) . '/dataset/uf_group_test.xml')
+      $this->createFlatXMLDataSet(dirname(__FILE__) . '/dataset/uf_group_test.xml')
     );
 
     $this->callAPISuccess('uf_field', 'getfields', array('cache_clear' => 1));
@@ -79,7 +79,7 @@ class api_v3_UFFieldTest extends CiviUnitTestCase {
     );
   }
 
-  function tearDown() {
+  public function tearDown() {
     $this->quickCleanup(
       array(
         'civicrm_group',
@@ -92,7 +92,7 @@ class api_v3_UFFieldTest extends CiviUnitTestCase {
   }
 
   /**
-   * create / updating field
+   * Create / updating field
    */
   public function testCreateUFField() {
     $params = $this->_params; // copy
@@ -110,10 +110,11 @@ class api_v3_UFFieldTest extends CiviUnitTestCase {
     $this->callAPIFailure('uf_field', 'create', $params);
   }
 
-  function testCreateUFFieldWithWrongParams() {
+  public function testCreateUFFieldWithWrongParams() {
     $this->callAPIFailure('uf_field', 'create', array('field_name' => 'test field'));
     $this->callAPIFailure('uf_field', 'create', array('label' => 'name-less field'));
   }
+
   /**
    * Create a field with 'weight=1' and then a second with 'weight=1'. The second field
    * winds up with weight=1, and the first field gets bumped to 'weight=2'.
@@ -139,7 +140,7 @@ class api_v3_UFFieldTest extends CiviUnitTestCase {
   }
 
   /**
-   * deleting field
+   * Deleting field
    */
   public function testDeleteUFField() {
     $ufField = $this->callAPISuccess('uf_field', 'create', $this->_params);
@@ -156,7 +157,7 @@ class api_v3_UFFieldTest extends CiviUnitTestCase {
   }
 
   /**
-   * create / updating field
+   * Create / updating field
    */
   public function testReplaceUFFields() {
     $baseFields = array();