X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FWebTest%2FImport%2FMatchExternalIdTest.php;h=e8a1df5f26c696d3f3cd8d5d33c74abd81b4ef5e;hb=c3ad86334b83050ce3869a4b00925280ca50e4a2;hp=1aa0db57ed5ed1f09d4733a1b41c9302f6d8da45;hpb=408f13a58f0682807ab143115579d4165f4f5f66;p=civicrm-core.git diff --git a/tests/phpunit/WebTest/Import/MatchExternalIdTest.php b/tests/phpunit/WebTest/Import/MatchExternalIdTest.php index 1aa0db57ed..e8a1df5f26 100644 --- a/tests/phpunit/WebTest/Import/MatchExternalIdTest.php +++ b/tests/phpunit/WebTest/Import/MatchExternalIdTest.php @@ -25,6 +25,10 @@ */ require_once 'WebTest/Import/ImportCiviSeleniumTestCase.php'; + +/** + * Class WebTest_Import_MatchExternalIdTest + */ class WebTest_Import_MatchExternalIdTest extends ImportCiviSeleniumTestCase { protected function setUp() { @@ -74,6 +78,9 @@ class WebTest_Import_MatchExternalIdTest extends ImportCiviSeleniumTestCase { /* * Helper function to provide data for contribution import for Individual. */ + /** + * @return array + */ function _contributionIndividualCSVData() { $firstName1 = substr(sha1(rand()), 0, 7); $lastName1 = substr(sha1(rand()), 0, 7); @@ -122,6 +129,9 @@ class WebTest_Import_MatchExternalIdTest extends ImportCiviSeleniumTestCase { /* * Helper function to provide data for membership import for Individual. */ + /** + * @return array + */ function _memberIndividualCSVData() { $memTypeParams = $this->webtestAddMembershipType(); @@ -169,6 +179,9 @@ class WebTest_Import_MatchExternalIdTest extends ImportCiviSeleniumTestCase { /* * Helper function to provide data for participant import for Individual. */ + /** + * @return array + */ function _participantIndividualCSVData() { $eventInfo = $this->_addNewEvent(); @@ -229,6 +242,13 @@ class WebTest_Import_MatchExternalIdTest extends ImportCiviSeleniumTestCase { * * @return int external id */ + /** + * @param $firstName + * @param $lastName + * @param $externalId + * + * @return mixed + */ function _addContact($firstName, $lastName, $externalId) { $this->openCiviPage('contact/add', 'reset=1&ct=Individual'); @@ -256,12 +276,17 @@ class WebTest_Import_MatchExternalIdTest extends ImportCiviSeleniumTestCase { * * @return array $params event details of newly created event */ + /** + * @param array $params + * + * @return array + */ function _addNewEvent($params = array( )) { if (empty($params)) { - // We need a payment processor - $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7); + // Use default payment processor + $processorName = 'Test Processor'; $this->webtestAddPaymentProcessor($processorName); // create an event @@ -323,10 +348,10 @@ class WebTest_Import_MatchExternalIdTest extends ImportCiviSeleniumTestCase { $this->click("link=Online Registration"); $this->waitForElementPresent("_qf_Registration_upload-bottom"); - $this->check("is_online_registration"); + $this->click("is_online_registration"); $this->assertChecked("is_online_registration"); - $this->fillRichTextField("intro_text", "Fill in all the fields below and click Continue."); + $this->fillRichTextField("intro_text", "Fill in all the fields below and click Continue.", 'CKEditor', TRUE); // enable confirmation email $this->click("CIVICRM_QFID_1_is_email_confirm");