From 141d31708ca5ad57e982365b359eab2e3f78b136 Mon Sep 17 00:00:00 2001 From: kurund Date: Tue, 13 Aug 2013 03:39:48 +0530 Subject: [PATCH] fixes for WebTest_Contribute_AddBatchesTest::testBatchAddMembership --- CRM/Member/Page/Tab.php | 2 +- tests/phpunit/WebTest/Contribute/AddBatchesTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CRM/Member/Page/Tab.php b/CRM/Member/Page/Tab.php index cca6882886..fa337d57c3 100644 --- a/CRM/Member/Page/Tab.php +++ b/CRM/Member/Page/Tab.php @@ -523,7 +523,7 @@ class CRM_Member_Page_Tab extends CRM_Core_Page { * return null * @access public */ - function associatedContribution($contactId = NULL, $membershipId = NULL) { + public static function associatedContribution($contactId = NULL, $membershipId = NULL) { if (!$contactId) { $contactId = $this->_contactId; } diff --git a/tests/phpunit/WebTest/Contribute/AddBatchesTest.php b/tests/phpunit/WebTest/Contribute/AddBatchesTest.php index 7fa94e14b2..c40830f57c 100644 --- a/tests/phpunit/WebTest/Contribute/AddBatchesTest.php +++ b/tests/phpunit/WebTest/Contribute/AddBatchesTest.php @@ -88,7 +88,7 @@ class WebTest_Contribute_AddBatchesTest extends CiviSeleniumTestCase { $data[$i] = array( 'first_name' => 'Ma' . substr(sha1(rand()), 0, 7), 'last_name' => 'An' . substr(sha1(rand()), 0, 7), - 'membership_type' => 'Default Organization', + 'membership_type' => 'General', 'amount' => 100, 'financial_type' => 'Member Dues', ); @@ -118,7 +118,7 @@ class WebTest_Contribute_AddBatchesTest extends CiviSeleniumTestCase { } elseif ($type == "Membership") { - $this->select("field[{$row}][membership_type][0]", $data['membership_type']); + $this->select("field[{$row}][membership_type][1]", $data['membership_type']); $this->webtestFillDate("field_{$row}_join_date", "now"); $this->webtestFillDate("field_{$row}_membership_start_date", "now"); $this->webtestFillDate("field_{$row}_membership_end_date", "+1 month"); -- 2.25.1