X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FWebTest%2FEvent%2FParticipantCountTest.php;h=194f0968d9b95769f9071364cf99714a3704d7da;hb=82af04d6a6f8bb1acc04bc8b720038c7adc2821e;hp=2e7a16d6ee6d941ae2bab533312a9da5d63aaa22;hpb=e8cca51aa6ed1feb98786bd980a1395d8a9a785a;p=civicrm-core.git diff --git a/tests/phpunit/WebTest/Event/ParticipantCountTest.php b/tests/phpunit/WebTest/Event/ParticipantCountTest.php index 2e7a16d6ee..194f0968d9 100644 --- a/tests/phpunit/WebTest/Event/ParticipantCountTest.php +++ b/tests/phpunit/WebTest/Event/ParticipantCountTest.php @@ -1,7 +1,7 @@ webtestLogin(); @@ -73,7 +73,7 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('first_name', 'Mary'); - $this->type('last_name', 'Jones'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jones' . substr(sha1(rand()), 0, 5)); $this->type('email-Primary', $email); // fill billing details and register @@ -90,7 +90,7 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { $this->click("xpath=//input[@class='crm-form-radio']"); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('first_name', 'Mary'); - $this->type('last_name', 'Jones'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jones' . substr(sha1(rand()), 0, 5)); $this->type('email-Primary', $email); // fill billing details and register @@ -106,10 +106,10 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { $this->waitForPageToLoad($this->getTimeoutMsec()); // verify number of registered participants - $this->assertTrue($this->isTextPresent('2 Results')); + $this->assertElementContainsText("xpath=//div[@id='search-status']/table/tbody/tr[1]/td", '2 Results'); } - function testParticipantCountWithPriceset() { + public function testParticipantCountWithPriceset() { // Log in using webtestLogin() method $this->webtestLogin(); @@ -301,7 +301,7 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { * @param $setTitle * @param string $financialType */ - function _testAddSet($setTitle, $financialType = 'Event Fee') { + public function _testAddSet($setTitle, $financialType = 'Event Fee') { $this->openCiviPage('admin/price', 'reset=1&action=add', '_qf_Set_next-bottom'); // Enter Priceset fields (Title, Used For ...) @@ -317,7 +317,7 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { /** * @param $options */ - function _testAddMultipleChoiceOptions($options) { + public function _testAddMultipleChoiceOptions($options) { foreach ($options as $oIndex => $oValue) { $this->type("option_label_{$oIndex}", $oValue['label']); $this->type("option_amount_{$oIndex}", $oValue['amount']); @@ -331,11 +331,11 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { } /** - * @param $params + * @param array $params * * @return string */ - function _testAddEvent($params) { + public function _testAddEvent($params) { $this->openCiviPage('event/add', 'reset=1&action=add', '_qf_EventInfo_upload-bottom'); $this->select('event_type_id', "value={$params['event_type_id']}"); @@ -412,7 +412,7 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { /** * @param array $participant */ - function _testRegisterWithBillingInfo($participant = array()) { + public function _testRegisterWithBillingInfo($participant = array()) { $this->waitForElementPresent("credit_card_type"); $this->select('credit_card_type', 'value=Visa'); $this->type('credit_card_number', '4111111111111111'); @@ -437,18 +437,18 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { } /** - * @param $eventParams + * @param array $eventParams * @param $participants * @param $priceFieldOptionCounts */ - function _testPricesetDetailsCustomSearch($eventParams, $participants, $priceFieldOptionCounts) { + public function _testPricesetDetailsCustomSearch($eventParams, $participants, $priceFieldOptionCounts) { $this->openCiviPage('contact/search/custom', 'csid=9&reset=1'); $this->select('event_id', 'label=' . $eventParams['title']); $this->click('_qf_Custom_refresh-bottom'); $this->waitForPageToLoad($this->getTimeoutMsec()); - $tableHeaders = array('Contact ID', 'Participant Id', 'Name'); + $tableHeaders = array('Contact ID', 'Participant ID', 'Name'); $tableHeaders = array_merge($tableHeaders, array_keys(current($priceFieldOptionCounts))); $tdnum = 2; @@ -467,4 +467,3 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { } } } -