tests/phpunit - Declare `@group headless`
[civicrm-core.git] / tests / phpunit / CRM / Core / BAO / EmailTest.php
index 3ca6ab6c0665e29ba7d7df7f4545b08d0497dc52..0adb529215399b6d02b1b64f67c1155c5f1e5298 100644 (file)
@@ -1,32 +1,22 @@
 <?php
-require_once 'CiviTest/CiviUnitTestCase.php';
+
 require_once 'CiviTest/Contact.php';
 
 /**
  * Class CRM_Core_BAO_EmailTest
+ * @group headless
  */
 class CRM_Core_BAO_EmailTest extends CiviUnitTestCase {
-  /**
-   * @return array
-   */
-  function get_info() {
-    return array(
-      'name' => 'Email BAOs',
-      'description' => 'Test all Core_BAO_Email methods.',
-      'group' => 'CiviCRM BAO Tests',
-    );
-  }
-
-  function setUp() {
+  public function setUp() {
     parent::setUp();
 
-    $this->quickCleanup( array( 'civicrm_contact', 'civicrm_email' ) );
+    $this->quickCleanup(array('civicrm_contact', 'civicrm_email'));
   }
 
   /**
-   * add() method (create and update modes)
+   * Add() method (create and update modes)
    */
-  function testAdd() {
+  public function testAdd() {
     $contactId = Contact::createIndividual();
 
     $params = array();
@@ -64,9 +54,9 @@ class CRM_Core_BAO_EmailTest extends CiviUnitTestCase {
   }
 
   /**
-   * holdEmail() method (set and reset on_hold condition)
+   * HoldEmail() method (set and reset on_hold condition)
    */
-  function testHoldEmail() {
+  public function testHoldEmail() {
     $contactId = Contact::createIndividual();
 
     $params = array();
@@ -137,9 +127,9 @@ class CRM_Core_BAO_EmailTest extends CiviUnitTestCase {
   }
 
   /**
-   * allEmails() method - get all emails for our contact, with primary email first
+   * AllEmails() method - get all emails for our contact, with primary email first
    */
-  function testAllEmails() {
+  public function testAllEmails() {
     $contactParams = array(
       'first_name' => 'Alan',
       'last_name' => 'Smith',
@@ -161,5 +151,5 @@ class CRM_Core_BAO_EmailTest extends CiviUnitTestCase {
 
     Contact::delete($contactId);
   }
-}
 
+}