<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
parent::setUp();
}
- function testEventParticipationAdd() {
+ public function testEventParticipationAdd() {
$this->webtestLogin();
// Adding contact with randomized first name (so we can then select that contact when creating event registration)
);
}
- function testEventParticipationAddWithMultipleRoles() {
+ public function testEventParticipationAddWithMultipleRoles() {
$this->webtestLogin();
// Adding contact with randomized first name (so we can then select that contact when creating event registration)
$this->verifyText("xpath=//table/tbody/tr/td[text()='Total Amount']/following-sibling::td/strong", preg_quote('$ 800.00'), 'In line ' . __LINE__);
}
- function testEventAddMultipleParticipants() {
+ public function testEventAddMultipleParticipants() {
$this->webtestLogin();
$processorId = $this->webtestAddPaymentProcessor();
//verifying the registered participants
$status = "Registered (test)";
- foreach($contacts as $contact) {
+ foreach ($contacts as $contact) {
$this->verifyText("xpath=//div[@id='participantSearch']//table//tbody//tr/td[@class='crm-participant-sort_name']/a[text()='{$contact['sort_name']}']/../../td[9]", preg_quote($status));
$this->verifyText("xpath=//div[@id='participantSearch']//table//tbody//tr/td[@class='crm-participant-sort_name']/a[text()='{$contact['sort_name']}']/../../td[4]/a", preg_quote($eventName));
-}
+ }
}
- function testAjaxCustomGroupLoad() {
+ public function testAjaxCustomGroupLoad() {
$this->webtestLogin();
$customSets = array(
- array('entity' => 'ParticipantEventName', 'subEntity' => 'Fall Fundraiser Dinner',
- 'triggerElement' => array('name' => "event_id", 'type' => "select2")),
- array('entity' => 'ParticipantRole', 'subEntity' => 'Attendee','triggerElement' => array('name' => 'role_id', 'type' => "select"))
+ array(
+ 'entity' => 'ParticipantEventName',
+ 'subEntity' => 'Fall Fundraiser Dinner',
+ 'triggerElement' => array('name' => "event_id", 'type' => "select2")
+ ),
+ array(
+ 'entity' => 'ParticipantRole',
+ 'subEntity' => 'Attendee',
+ 'triggerElement' => array('name' => 'role_id', 'type' => "select")
+ ),
);
$pageUrl = array('url' => "participant/add", 'args' => "reset=1&action=add&context=standalone");
$this->customFieldSetLoadOnTheFlyCheck($customSets, $pageUrl, TRUE);
/*
* Webtest for CRM-10983
- *
*/
- function testCheckDuplicateCustomDataLoad() {
+ public function testCheckDuplicateCustomDataLoad() {
$this->webtestLogin();
$customSets = array(
- array('entity' => 'ParticipantEventType', 'subEntity' => '- Any -',
- 'triggerElement' => array('name' => "event_id", 'type' => "select")),
- array('entity' => 'ParticipantEventName', 'subEntity' => '- Any -',
- 'triggerElement' => array('name' => "event_id", 'type' => "select")),
- array('entity' => 'ParticipantEventName', 'subEntity' => 'Rain-forest Cup Youth Soccer Tournament',
- 'triggerElement' => array('name' => "event_id", 'type' => "select")),
- array('entity' => 'ParticipantRole', 'subEntity' => '- Any -','triggerElement' => array('type' => "checkbox")),
- array('entity' => 'ParticipantRole', 'subEntity' => 'Volunteer','triggerElement' => array('type' => "checkbox"))
+ array(
+ 'entity' => 'ParticipantEventType',
+ 'subEntity' => '- Any -',
+ 'triggerElement' => array('name' => "event_id", 'type' => "select")
+ ),
+ array(
+ 'entity' => 'ParticipantEventName',
+ 'subEntity' => '- Any -',
+ 'triggerElement' => array('name' => "event_id", 'type' => "select")
+ ),
+ array(
+ 'entity' => 'ParticipantEventName',
+ 'subEntity' => 'Rain-forest Cup Youth Soccer Tournament',
+ 'triggerElement' => array('name' => "event_id", 'type' => "select")
+ ),
+ array('entity' => 'ParticipantRole', 'subEntity' => '- Any -', 'triggerElement' => array('type' => "checkbox")),
+ array('entity' => 'ParticipantRole', 'subEntity' => 'Volunteer', 'triggerElement' => array('type' => "checkbox")),
);
$return = $this->addCustomGroupField($customSets);
}
/**
- * @param string $firstName
- * @param string $lastName
* @param int $processorId
*/
- function _fillParticipantDetails($processorId) {
+ public function _fillParticipantDetails($processorId) {
$contact = $this->createDialogContact();
- $this->select('payment_processor_id', "value={$processorId}");
$event_id = $this->getAttribute("xpath=//*[@id='event_id']@value");
//check if it is the selected event
$this->assertEquals($event_id, 3);