Fixed warnings for mailing webtest
authorpratikshad <pratiksha.dubey@webaccess.co.in>
Mon, 23 Mar 2015 13:43:21 +0000 (19:13 +0530)
committerpratikshad <pratiksha.dubey@webaccess.co.in>
Mon, 23 Mar 2015 13:43:21 +0000 (19:13 +0530)
tests/phpunit/WebTest/Campaign/MailingTest.php
tests/phpunit/WebTest/Mailing/AddMessageTemplateTest.php

index 85e33874627341b00d9cf299daa58ac211da8349..e62d2224a193fa12773e817c121614a80aa05bab 100644 (file)
@@ -101,7 +101,7 @@ class WebTest_Campaign_MailingTest extends CiviSeleniumTestCase {
   /**
    * @param string $groupName
    * @param $campaignTitle
-   * @param int $id
+   * @param $firstUserName
    */
   public function mailingAddTest($groupName, $campaignTitle, $title, $firstUserName) {
     //---- create mailing contact and add to mailing Group
@@ -123,7 +123,7 @@ class WebTest_Campaign_MailingTest extends CiviSeleniumTestCase {
     $this->type("xpath=//input[@name='mailingName']", "Mailing $mailingName Webtest");
 
     // select campaign
-    $this->select2("s2id_crmUiId_4", "Campaign_".$title);
+    $this->select2("s2id_crmUiId_4", "Campaign_" . $title);
 
     // Add the test mailing group
     $this->select2("s2id_crmUiId_8", $groupName, TRUE);
@@ -162,7 +162,6 @@ class WebTest_Campaign_MailingTest extends CiviSeleniumTestCase {
     $this->select("header_id", "label=Mailing Header");
     $this->select("footer_id", "label=Mailing Footer");
 
-
     //---------------Test------------------
 
     ////////--Commenting test mailing and mailing preview (test mailing and preview not presently working).
@@ -189,8 +188,8 @@ class WebTest_Campaign_MailingTest extends CiviSeleniumTestCase {
     $this->waitForTextPresent("Mailing $mailingName Webtest");
     $this->click("xpath=//div[@class='content']//a[text()='~2 recipients']");
     $verifyData = array(
-      "$firstUserName Smith"=> "$firstUserName.smith@example.org",
-      "$firstName Mailson"=> "mailino$firstName@mailson.co.in",
+      "$firstUserName Smith" => "$firstUserName.smith@example.org",
+      "$firstName Mailson" => "mailino$firstName@mailson.co.in",
     );
     $this->webtestVerifyTabularData($verifyData);
     $this->waitForTextPresent("(Include: $groupName)");
index 9195c74868525dc8d0fbd26f5da24abdbc65cef6..5f704c2c6d849892486caef2ec40f709584474f0 100644 (file)
@@ -137,14 +137,13 @@ class WebTest_Mailing_AddMessageTemplateTest extends CiviSeleniumTestCase {
     $this->select('header_id', "label=Mailing Header");
     $this->select('footer_id', "label=Mailing Footer");
 
-
     // click next
     $this->click("xpath=//div[@class='crm-wizard-buttons']/button[text()='Next']");
 
     $this->assertChecked("xpath=//input[@id='schedule-send-now']");
     $this->waitForTextPresent("Mailing $mailingName Webtest");
     $this->click("xpath=//div[@class='content']//a[text()='~1 recipient']");
-    $this->webtestVerifyTabularData(array("$firstName Mailson"=> "mailino$firstName@mailson.co.in"));
+    $this->webtestVerifyTabularData(array("$firstName Mailson" => "mailino$firstName@mailson.co.in"));
     $this->click("xpath=//button[@title='Close']");
     $this->waitForTextPresent("(Include: $groupName)");
 
@@ -163,7 +162,7 @@ class WebTest_Mailing_AddMessageTemplateTest extends CiviSeleniumTestCase {
     //View Activity
     $this->openCiviPage('activity/search', "reset=1", "_qf_Search_refresh");
     $this->type("sort_name", $firstName);
-    $this->select("activity_type_id","label=Bulk Email");
+    $this->select("activity_type_id", "label=Bulk Email");
     $this->click("_qf_Search_refresh");
     $this->waitForElementPresent("xpath=//form[@id='Search']/div[3]/div/div[2]/table[@class='selector row-highlight']/tbody/tr[2]/td[9]/span/a[1][text()='View']");
     $this->click("xpath=//form[@id='Search']/div[3]/div/div[2]/table[@class='selector row-highlight']/tbody/tr[2]/td[9]/span/a[1][text()='View']");