Merge pull request #4863 from totten/master-phpcbf4
[civicrm-core.git] / tests / phpunit / WebTest / Profile / ProfileCountryState.php
index 9d90225a67d0c4a9cf76226da293f7f806443260..074bc5b07e290b1d78b687a627e64ea8368fe806 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_Profile_ProfileCountryState extends CiviSeleniumTestCase {
     parent::setUp();
   }
 
-  function testStateCountry() {
+  public function testStateCountry() {
     $this->webtestLogin();
     $config = CRM_Core_Config::singleton();
     // Add new profile.
@@ -54,7 +54,6 @@ class WebTest_Profile_ProfileCountryState extends CiviSeleniumTestCase {
     $this->click('_qf_Group_next');
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
-
     //check for  profile create
     $this->waitForText('crm-notification-container', "Profile '{$profileTitle}' has been added. You can add fields to this profile now.");
     $gid = $this->urlArg('gid');
@@ -102,7 +101,7 @@ class WebTest_Profile_ProfileCountryState extends CiviSeleniumTestCase {
           $this->click("//option[@value='$countryID']");
           $this->click("xpath=//tr[@class='crm-localization-form-block-provinceLimit']/td[2]/table//tbody/tr/td[2]/input[@name='add']");
         }
-        $added = true;
+        $added = TRUE;
       }
       if ($added) {
         $this->click("_qf_Localization_next-bottom");
@@ -130,16 +129,16 @@ class WebTest_Profile_ProfileCountryState extends CiviSeleniumTestCase {
       $this->openCiviPage("admin/setting/localization", "reset=1", "_qf_Localization_next-bottom");
       $enabledCountries = $this->getSelectOptions("countryLimit-t");
       $enabledStates = $this->getSelectOptions("provinceLimit-t");
-      $removed = false;
+      $removed = FALSE;
       foreach($newCountry as $countryID => $countryName) {
-          $this->addSelection("countryLimit-t", "label=$countryName");
-          $this->click("xpath=//select[@id='countryLimit-t']/option[@value='$countryID']");
-          $this->click("xpath=//tr[@class='crm-localization-form-block-countryLimit']/td[2]/table//tbody/tr/td[2]/input[@name='remove']");
-
-          $this->addSelection("provinceLimit-t", "label=$countryName");
-          $this->click("//option[@value='$countryID']");
-          $this->click("xpath=//tr[@class='crm-localization-form-block-provinceLimit']/td[2]/table//tbody/tr/td[2]/input[@name='remove']");
-          $removed = true;
+        $this->addSelection("countryLimit-t", "label=$countryName");
+        $this->click("xpath=//select[@id='countryLimit-t']/option[@value='$countryID']");
+        $this->click("xpath=//tr[@class='crm-localization-form-block-countryLimit']/td[2]/table//tbody/tr/td[2]/input[@name='remove']");
+
+        $this->addSelection("provinceLimit-t", "label=$countryName");
+        $this->click("//option[@value='$countryID']");
+        $this->click("xpath=//tr[@class='crm-localization-form-block-provinceLimit']/td[2]/table//tbody/tr/td[2]/input[@name='remove']");
+        $removed = TRUE;
       }
       if ($removed) {
         $this->click("_qf_Localization_next-bottom");