From: kurund Date: Tue, 13 Aug 2013 21:31:39 +0000 (+0530) Subject: whitespace fixes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f0a9a78127e4dde8b33458862a6013f11f379892;p=civicrm-core.git whitespace fixes --- diff --git a/tests/phpunit/WebTest/Event/MultipleEventRegistrationbyCartTest.php b/tests/phpunit/WebTest/Event/MultipleEventRegistrationbyCartTest.php index b11a6d471c..d375163c23 100755 --- a/tests/phpunit/WebTest/Event/MultipleEventRegistrationbyCartTest.php +++ b/tests/phpunit/WebTest/Event/MultipleEventRegistrationbyCartTest.php @@ -31,7 +31,7 @@ class WebTest_Event_MultipleEventRegistrationbyCartTest extends CiviSeleniumTest parent::setUp(); } - function testAuthenticatedMultipleEvent(){ + function testAuthenticatedMultipleEvent() { // Log in using webtestLogin() method $this->webtestLogin(); @@ -113,17 +113,18 @@ class WebTest_Event_MultipleEventRegistrationbyCartTest extends CiviSeleniumTest $value = $this->_testCheckOut(); //three event names - $events = array( 1 => $eventTitle1, - 2 => $eventTitle2, - 3 => $eventTitle3, - ); + $events = array( + 1 => $eventTitle1, + 2 => $eventTitle2, + 3 => $eventTitle3, + ); //check the existence of the contacts who were registered and the one who did the contribution - $this->_checkContributionsandEventRegistration($value[0],$value[1],$events); + $this->_checkContributionsandEventRegistration($value[0], $value[1], $events); } - function testAnonymousMultipleEvent(){ - // This is the path where our testing install resides. + function testAnonymousMultipleEvent() { + // This is the path where our testing install resides. // The rest of URL is defined in CiviSeleniumTestCase base class, in // class attributes. @@ -215,13 +216,14 @@ class WebTest_Event_MultipleEventRegistrationbyCartTest extends CiviSeleniumTest $this->openCiviPage("dashboard", "reset=1"); //three event names - $events = array( 1 => $eventTitle1, - 2 => $eventTitle2, - 3 => $eventTitle3, - ); + $events = array( + 1 => $eventTitle1, + 2 => $eventTitle2, + 3 => $eventTitle3, + ); //check the existence of the contacts who were registered and the one who did the contribution - $this->_checkContributionsandEventRegistration($value[0],$value[1],$events); + $this->_checkContributionsandEventRegistration($value[0], $value[1], $events); } function _testAddEventInfo($eventTitle, $eventDescription) { @@ -273,7 +275,7 @@ class WebTest_Event_MultipleEventRegistrationbyCartTest extends CiviSeleniumTest $this->waitForElementPresent("_qf_Fee_upload-bottom"); $this->click("CIVICRM_QFID_1_is_monetary"); $this->click("xpath=//tr[@class='crm-event-manage-fee-form-block-payment_processor']/td[2]/label[text()='$processorName']"); - $this->select('financial_type_id','Event Fee'); + $this->select('financial_type_id', 'Event Fee'); if ($priceSet) { // get one - TBD } @@ -293,8 +295,8 @@ class WebTest_Event_MultipleEventRegistrationbyCartTest extends CiviSeleniumTest $this->webtestFillDate("discount_start_date_1", "-1 week"); $this->webtestFillDate("discount_end_date_1", "+2 week"); $this->clickLink("_qf_Fee_submit", "discounted_value_2_1"); - $this->type("discounted_value_1_1","225.00"); - $this->type("discounted_value_2_1","300.00"); + $this->type("discounted_value_1_1", "225.00"); + $this->type("discounted_value_2_1", "300.00"); $this->click("xpath=//fieldset[@id='discount']/fieldset/table/tbody/tr[2]/td[3]/input"); } @@ -368,7 +370,7 @@ class WebTest_Event_MultipleEventRegistrationbyCartTest extends CiviSeleniumTest $this->waitForPageToLoad($this->getTimeoutMsec()); } - function _testCheckOut(){ + function _testCheckOut() { //View the Cart $this->click("xpath=//div[@id='messages']/div/div/a[text()='View your cart.']"); @@ -377,11 +379,11 @@ class WebTest_Event_MultipleEventRegistrationbyCartTest extends CiviSeleniumTest $this->click("xpath=//a[@class='button crm-check-out-button']/span"); $this->waitForPageToLoad($this->getTimeoutMsec()); - $firstName = "AB".substr(sha1(rand()), 0, 7); - $lastName = "XY".substr(sha1(rand()), 0, 7); - for( $i = 1; $i <= 3; $i++ ){ - $this->type("xpath=//form[@id='ParticipantsAndPrices']/fieldset[$i]/div/fieldset/div/div/fieldset/div/div[2]/input","{$firstName}.{$lastName}@home.com"); - $this->type("xpath=//form[@id='ParticipantsAndPrices']/fieldset[$i]/div/fieldset/div/div[2]/div[2]/input","{$firstName}.{$lastName}@example.com"); + $firstName = "AB" . substr(sha1(rand()), 0, 7); + $lastName = "XY" . substr(sha1(rand()), 0, 7); + for ($i = 1; $i <= 3; $i++) { + $this->type("xpath=//form[@id='ParticipantsAndPrices']/fieldset[$i]/div/fieldset/div/div/fieldset/div/div[2]/input", "{$firstName}.{$lastName}@home.com"); + $this->type("xpath=//form[@id='ParticipantsAndPrices']/fieldset[$i]/div/fieldset/div/div[2]/div[2]/input", "{$firstName}.{$lastName}@example.com"); $this->click("xpath=//form[@id='ParticipantsAndPrices']/fieldset[$i]/div[2]/div[2]/input[2]"); } $this->click("_qf_ParticipantsAndPrices_upload-bottom"); @@ -407,10 +409,10 @@ class WebTest_Event_MultipleEventRegistrationbyCartTest extends CiviSeleniumTest return array($firstName, $lastName); } - function _checkContributionsandEventRegistration($firstName,$lastName,$events){ + function _checkContributionsandEventRegistration($firstName, $lastName, $events) { //Type the registered participant's email in autocomplete. $this->click('sort_name_navigation'); - $this->type('css=input#sort_name_navigation',"{$firstName}.{$lastName}@home.com" ); + $this->type('css=input#sort_name_navigation', "{$firstName}.{$lastName}@home.com"); $this->typeKeys('css=input#sort_name_navigation', "{$firstName}.{$lastName}@home.com"); // Wait for result list. @@ -423,18 +425,18 @@ class WebTest_Event_MultipleEventRegistrationbyCartTest extends CiviSeleniumTest //click on Events Tab $this->click("xpath=//li[@id='tab_participant']/a"); //check if the participant is registered for all the three events - foreach($events as $key => $value){ + foreach ($events as $key => $value) { $this->waitForElementPresent("link=$value"); $this->assertTrue($this->isElementPresent("link=$value")); } - for( $i = 1; $i <= 3; $i++ ){ + for ($i = 1; $i <= 3; $i++) { $this->waitForElementPresent("xpath=//table[@class='selector']/tbody/tr[$i]/td[6][text()='Registered']"); $this->assertTrue($this->isElementPresent("xpath=//table[@class='selector']/tbody/tr[$i]/td[6][text()='Registered']")); } //Type the billing email in autocomplete. $this->click('sort_name_navigation'); - $this->type('css=input#sort_name_navigation',"{$firstName}.{$lastName}@example.com" ); + $this->type('css=input#sort_name_navigation', "{$firstName}.{$lastName}@example.com"); $this->typeKeys('css=input#sort_name_navigation', "{$firstName}.{$lastName}@example.com"); // Wait for result list. @@ -447,7 +449,7 @@ class WebTest_Event_MultipleEventRegistrationbyCartTest extends CiviSeleniumTest //click on Contributions Tab $this->click("xpath=//li[@id='tab_contribute']/a"); //check for the three contributions - foreach($events as $key => $value){ + foreach ($events as $key => $value) { $this->waitForElementPresent("xpath=//table[@class='selector']/tbody/tr/td[3][contains(text(),'$value')]"); $this->assertTrue($this->isElementPresent("xpath=//table[@class='selector']/tbody/tr/td[3][contains(text(),'$value')]")); }