INFRA-132 - @param type fixes
[civicrm-core.git] / tests / phpunit / WebTest / Contact / RelationshipAddTest.php
index 7232e434a7f7d036dd85fe56e54782737d36daaa..d40a74e595ec169aa15afb6b1d1306fa9d5654c5 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -35,7 +35,7 @@ class WebTest_Contact_RelationshipAddTest extends CiviSeleniumTestCase {
     parent::setUp();
   }
 
-  function testRelationshipAddTest() {
+  public function testRelationshipAddTest() {
     $this->webtestLogin();
 
     //create a relationship type between different contact types
@@ -79,7 +79,6 @@ class WebTest_Contact_RelationshipAddTest extends CiviSeleniumTestCase {
     //fill in the individual
     $this->select2('related_contact_id', $sortName, TRUE);
 
-
     //fill in the relationship start date
     $this->webtestFillDate('start_date', '-2 year');
     $this->webtestFillDate('end_date', '+1 year');
@@ -164,7 +163,6 @@ class WebTest_Contact_RelationshipAddTest extends CiviSeleniumTestCase {
     //fill in the individual
     $this->select2('related_contact_id', $sortName, TRUE);
 
-
     //fill in the relationship start date
     $this->webtestFillDate('start_date', '-2 year');
     $this->webtestFillDate('end_date', '+1 year');
@@ -189,7 +187,7 @@ class WebTest_Contact_RelationshipAddTest extends CiviSeleniumTestCase {
 
     //test for individual contact and household subtype contact
     //relationship
-    $typeb = "Household__". $householdSubtypeName;
+    $typeb = "Household__" . $householdSubtypeName;
 
     //create a relationship type between different contact types
     $params = array(
@@ -280,7 +278,7 @@ class WebTest_Contact_RelationshipAddTest extends CiviSeleniumTestCase {
     $this->assertTrue($this->isTextPresent($params['label_b_a']));
   }
 
-  function testRelationshipAddNewIndividualTest() {
+  public function testRelationshipAddNewIndividualTest() {
     $this->webtestLogin();
 
     //create a relationship type between different contact types
@@ -323,7 +321,7 @@ class WebTest_Contact_RelationshipAddTest extends CiviSeleniumTestCase {
     $this->type('organization_name', $orgName);
     $this->type('email-Primary', "info@" . $orgName . ".com");
     $this->click('_qf_Edit_next');
-    $this->waitForText("xpath=//div[@id='s2id_related_contact_id']","$orgName");
+    $this->waitForText("xpath=//div[@id='s2id_related_contact_id']", "$orgName");
 
     //fill in the relationship start date
     $this->webtestFillDate('start_date', '-2 year');
@@ -336,7 +334,6 @@ class WebTest_Contact_RelationshipAddTest extends CiviSeleniumTestCase {
     //$this->click("_qf_Relationship_upload");
     $this->click("_qf_Relationship_upload-bottom");
 
-
     //check the status message
     $this->waitForText('crm-notification-container', 'Relationship created.');
 
@@ -352,7 +349,7 @@ class WebTest_Contact_RelationshipAddTest extends CiviSeleniumTestCase {
     $this->assertTrue($this->isTextPresent($params['label_a_b']));
   }
 
-  function testAjaxCustomGroupLoad() {
+  public function testAjaxCustomGroupLoad() {
     $this->webtestLogin();
 
     //create a New Individual
@@ -363,14 +360,14 @@ class WebTest_Contact_RelationshipAddTest extends CiviSeleniumTestCase {
     $triggerElement = array('name' => 'relationship_type_id', 'type' => 'select');
     $customSets = array(
       array('entity' => 'Relationship', 'subEntity' => 'Partner of', 'triggerElement' => $triggerElement),
-      array('entity' => 'Relationship', 'subEntity' => 'Spouse of', 'triggerElement' => $triggerElement)
+      array('entity' => 'Relationship', 'subEntity' => 'Spouse of', 'triggerElement' => $triggerElement),
     );
 
     $pageUrl = array('url' => 'contact/view/rel', 'args' => "cid={$contactId[1]}&action=add&reset=1");
     $this->customFieldSetLoadOnTheFlyCheck($customSets, $pageUrl);
   }
 
-  function testRelationshipAddCurrentEmployerTest() {
+  public function testRelationshipAddCurrentEmployerTest() {
     $this->webtestLogin();
 
     //create a New Individual
@@ -402,7 +399,7 @@ class WebTest_Contact_RelationshipAddTest extends CiviSeleniumTestCase {
     $this->type('organization_name', $orgName);
     $this->type('email-Primary', "info@" . $orgName . ".com");
     $this->click('_qf_Edit_next');
-    $this->waitForText("xpath=//div[@id='s2id_related_contact_id']","$orgName");
+    $this->waitForText("xpath=//div[@id='s2id_related_contact_id']", "$orgName");
 
     //fill in the relationship start date
     $this->webtestFillDate('start_date', '-2 year');
@@ -411,7 +408,6 @@ class WebTest_Contact_RelationshipAddTest extends CiviSeleniumTestCase {
     $description = "Current employee test.";
     $this->type("description", $description);
 
-
     //save the relationship
     //$this->click("_qf_Relationship_upload");
     $this->click('_qf_Relationship_upload-bottom');
@@ -429,6 +425,6 @@ class WebTest_Contact_RelationshipAddTest extends CiviSeleniumTestCase {
         'Status' => 'Enabled',
       )
     );
-    $this->assertTrue($this->isTextPresent("Employee of"),"Employee of relationship type not visible on View Relationship page.");
+    $this->assertTrue($this->isTextPresent("Employee of"), "Employee of relationship type not visible on View Relationship page.");
   }
 }