clean up fixes for batch 5
[civicrm-core.git] / tests / phpunit / CRM / Contact / Form / Search / Custom / GroupTest.php
index 3699a844ad1b2e7aea2bded5942b81a8dafffa94..57d3bad04d59d48ed734036f91b5099d38dd7bc4 100644 (file)
@@ -4,11 +4,11 @@
  *
  *  (PHP 5)
  *
- *   @author Walt Haas <walt@dharmatech.org> (801) 534-1262
- *   @copyright Copyright CiviCRM LLC (C) 2009
- *   @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html
+ * @author Walt Haas <walt@dharmatech.org> (801) 534-1262
+ * @copyright Copyright CiviCRM LLC (C) 2009
+ * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html
  *              GNU Affero General Public License version 3
- *   @package CiviCRM
+ * @package CiviCRM
  *
  *   This file is part of CiviCRM
  *
@@ -51,7 +51,7 @@ require_once 'CiviTest/CiviUnitTestCase.php';
 /**
  *  Test contact custom search functions
  *
- *  @package CiviCRM
+ * @package CiviCRM
  */
 class CRM_Contact_Form_Search_Custom_GroupTest extends CiviUnitTestCase {
   protected $_tablesToTruncate = array(
@@ -69,18 +69,24 @@ class CRM_Contact_Form_Search_Custom_GroupTest extends CiviUnitTestCase {
    * @return CRM_Contact_Form_Search_Custom_GroupTestDataProvider
    */
   public function dataProvider() {
-    return new CRM_Contact_Form_Search_Custom_GroupTestDataProvider;
+    return new CRM_Contact_Form_Search_Custom_GroupTestDataProvider();
   }
 
   public function setUp() {
     parent::setUp();
   }
 
-  public function tearDown() {}
+  public function tearDown() {
+  }
 
   /**
    *  Test CRM_Contact_Form_Search_Custom_Group::count()
-   *  @dataProvider dataProvider
+   * @dataProvider dataProvider
+   * @param $fv
+   * @param $count
+   * @param $ids
+   * @param $full
+   * @throws \Exception
    */
   public function testCount($fv, $count, $ids, $full) {
     $this->foreignKeyChecksOff();
@@ -100,10 +106,10 @@ class CRM_Contact_Form_Search_Custom_GroupTest extends CiviUnitTestCase {
     $dao = CRM_Core_DAO::executeQuery($sql);
 
     /**
-     echo "Count: $count, OBJ: ", $obj->count( ) . "\n";
-     while ( $dao->fetch( ) ) {
-     echo "{$dao->contact_id}, {$dao->contact_type}, {$dao->sort_name}, {$dao->group_names}\n";
-     }
+     echo "Count: $count, OBJ: ", $obj->count( ) . "\n";
+     while ( $dao->fetch( ) ) {
+     echo "{$dao->contact_id}, {$dao->contact_type}, {$dao->sort_name}, {$dao->group_names}\n";
+     }
      **/
     $this->assertEquals($count, $obj->count(),
       'In line ' . __LINE__
@@ -112,7 +118,12 @@ class CRM_Contact_Form_Search_Custom_GroupTest extends CiviUnitTestCase {
 
   /**
    *  Test CRM_Contact_Form_Search_Custom_Group::all()
-   *  @dataProvider dataProvider
+   * @dataProvider dataProvider
+   * @param $fv
+   * @param $count
+   * @param $ids
+   * @param $full
+   * @throws \Exception
    */
   public function testAll($fv, $count, $ids, $full) {
     // Truncate affected tables
@@ -143,7 +154,12 @@ class CRM_Contact_Form_Search_Custom_GroupTest extends CiviUnitTestCase {
 
   /**
    *  Test CRM_Contact_Form_Search_Custom_Group::contactIDs()
-   *  @dataProvider dataProvider
+   * @dataProvider dataProvider
+   * @param $fv
+   * @param $count
+   * @param $ids
+   * @param $full
+   * @throws \Exception
    */
   public function testContactIDs($fv, $count, $ids, $full) {
     // Truncate affected tables
@@ -175,8 +191,8 @@ class CRM_Contact_Form_Search_Custom_GroupTest extends CiviUnitTestCase {
    */
   public function testColumns() {
     $formValues = array();
-    $obj        = new CRM_Contact_Form_Search_Custom_Group($formValues);
-    $columns    = $obj->columns();
+    $obj = new CRM_Contact_Form_Search_Custom_Group($formValues);
+    $columns = $obj->columns();
     $this->assertTrue(is_array($columns), 'In line ' . __LINE__);
     foreach ($columns as $key => $value) {
       $this->assertTrue(is_string($key), 'In line ' . __LINE__);
@@ -186,9 +202,10 @@ class CRM_Contact_Form_Search_Custom_GroupTest extends CiviUnitTestCase {
 
   /**
    *  Test CRM_Contact_Form_Search_Custom_Group::from()
-   *  @todo write this test
+   * @todo write this test
    */
-  public function SKIPPED_testFrom() {}
+  public function SKIPPED_testFrom() {
+  }
 
   /**
    *  Test CRM_Contact_Form_Search_Custom_Group::summary()
@@ -206,8 +223,8 @@ class CRM_Contact_Form_Search_Custom_GroupTest extends CiviUnitTestCase {
    */
   public function testTemplateFile() {
     $formValues = array();
-    $obj        = new CRM_Contact_Form_Search_Custom_Group($formValues);
-    $fileName   = $obj->templateFile();
+    $obj = new CRM_Contact_Form_Search_Custom_Group($formValues);
+    $fileName = $obj->templateFile();
     $this->assertTrue(is_string($fileName), 'In line ' . __LINE__);
     //FIXME: we would need to search the include path to do the following
     //$this->assertTrue( file_exists( $fileName ), 'In line ' . __LINE__ );