fix membershiptypetest
[civicrm-core.git] / tests / phpunit / api / v3 / UFMatchTest.php
index de55c9e644b014b6e0c4de79e66ac25f0aa3b0ea..fde182af224bc976984786d52a5b589e78dd7ad2 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -23,9 +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';
@@ -34,7 +32,7 @@ require_once 'CiviTest/CiviUnitTestCase.php';
  * Test class for UFGroup API - civicrm_uf_*
  * @todo Split UFGroup and UFJoin tests
  *
- *  @package   CiviCRM
+ * @package   CiviCRM
  */
 class api_v3_UFMatchTest extends CiviUnitTestCase {
   // ids from the uf_group_test.xml fixture
@@ -45,7 +43,6 @@ class api_v3_UFMatchTest extends CiviUnitTestCase {
   protected $_params = array();
 
 
-
   protected function setUp() {
     parent::setUp();
     $this->_apiversion = 3;
@@ -59,7 +56,7 @@ class api_v3_UFMatchTest extends CiviUnitTestCase {
       )
     );
     $this->_contactId = $this->individualCreate();
-    $op = new PHPUnit_Extensions_Database_Operation_Insert;
+    $op = new PHPUnit_Extensions_Database_Operation_Insert();
     $op->execute(
       $this->_dbconn,
       $this->createFlatXMLDataSet(dirname(__FILE__) . '/dataset/uf_group_test.xml')
@@ -70,7 +67,7 @@ class api_v3_UFMatchTest extends CiviUnitTestCase {
       'uf_id' => '2',
       'uf_name' => 'blahdyblah@gmail.com',
       'domain_id' => 1,
-      );
+    );
   }
 
   public function tearDown() {
@@ -87,7 +84,7 @@ class api_v3_UFMatchTest extends CiviUnitTestCase {
   }
 
   /**
-   * Fetch contact id by uf id
+   * Fetch contact id by uf id.
    */
   public function testGetUFMatchID() {
     $params = array(
@@ -103,7 +100,7 @@ class api_v3_UFMatchTest extends CiviUnitTestCase {
   }
 
   /**
-   * Fetch uf id by contact id
+   * Fetch uf id by contact id.
    */
   public function testGetUFID() {
     $params = array(
@@ -119,7 +116,7 @@ class api_v3_UFMatchTest extends CiviUnitTestCase {
   }
 
   /**
-   *  Test civicrm_activity_create() using example code
+   * Test civicrm_activity_create() using example code
    */
   public function testUFMatchGetExample() {
     require_once 'api/v3/examples/UFMatch/Get.php';
@@ -135,12 +132,15 @@ class api_v3_UFMatchTest extends CiviUnitTestCase {
 
   public function testDelete() {
     $result = $this->callAPISuccess('uf_match', 'create', $this->_params);
-    $this->assertEquals(1, $this->callAPISuccess('uf_match', 'getcount', array(      'id' => $result['id'],
-      )));
-    $this->callAPISuccess('uf_match', 'delete', array(      'id' => $result['id'],
+    $this->assertEquals(1, $this->callAPISuccess('uf_match', 'getcount', array(
+      'id' => $result['id'],
+    )));
+    $this->callAPISuccess('uf_match', 'delete', array(
+      'id' => $result['id'],
     ));
-    $this->assertEquals(0, $this->callAPISuccess('uf_match', 'getcount', array('id' => $result['id'],
-      )));
+    $this->assertEquals(0, $this->callAPISuccess('uf_match', 'getcount', array(
+      'id' => $result['id'],
+    )));
   }
-}
 
+}