Merge pull request #8895 from totten/master-bin-adm
[civicrm-core.git] / tests / phpunit / api / v3 / DashboardContactTest.php
index a599b19012e48480b0187b9183b3e93b79155c0c..6f95516ff22fc97f04879b78d1629be4a77ed142 100644 (file)
  *   <http://www.gnu.org/licenses/>.
  */
 
-/**
- *  Include class definitions
- */
-require_once 'CiviTest/CiviUnitTestCase.php';
-
 /**
  *  Test APIv3 civicrm_action_schedule functions
  *
  * @package CiviCRM_APIv3
  * @subpackage API_ActionSchedule
+ * @group headless
  */
 class api_v3_DashboardContactTest extends CiviUnitTestCase {
   protected $_params;
@@ -37,10 +33,10 @@ class api_v3_DashboardContactTest extends CiviUnitTestCase {
   protected $_apiversion = 3;
 
   /**
-   *  Test setup for every test
+   * Test setup for every test.
    *
-   *  Connect to the database, truncate the tables that will be used
-   *  and redirect stdin to a temporary file
+   * Connect to the database, truncate the tables that will be used
+   * and redirect stdin to a temporary file
    */
   public function setUp() {
     //  Connect to the database
@@ -53,8 +49,8 @@ class api_v3_DashboardContactTest extends CiviUnitTestCase {
       'version' => 3,
       'label' => 'New Dashlet element',
       'name' => 'New Dashlet element',
-      'url' => 'civicrm/report/list&compid=99&reset=1&snippet=5',
-      'fullscreen_url' => 'civicrm/report/list&compid=99&reset=1&snippet=5&context=dashletFullscreen',
+      'url' => 'civicrm/report/list&compid=99&reset=1',
+      'fullscreen_url' => 'civicrm/report/list&compid=99&reset=1&context=dashletFullscreen',
     );
     $dashresult = $this->callAPISuccess('dashboard', 'create', $dashParams);
     $contact = $this->callAPISuccess('contact', 'create', array(
@@ -75,4 +71,5 @@ class api_v3_DashboardContactTest extends CiviUnitTestCase {
     $newCount = CRM_Core_DAO::singleValueQuery("select count(*) from civicrm_dashboard_contact where contact_id = {$contact['id']} AND is_active = 1 AND dashboard_id = {$dashresult['id']}");
     $this->assertEquals($oldCount + 1, $newCount);
   }
+
 }