X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fapi%2Fv3%2FMembershipTest.php;h=d5eb12c08f3824ddc4b019eb86d6c8aa9bb6dd23;hb=414b3228db09432f1e389a89f9fb9e3f22d0f2da;hp=0a1089266f959fc2ee2976a2dfa239f32165cac8;hpb=49414d6faa37375cef1ea0a156054ddd9cc6ae8d;p=civicrm-core.git diff --git a/tests/phpunit/api/v3/MembershipTest.php b/tests/phpunit/api/v3/MembershipTest.php index 0a1089266f..d5eb12c08f 100644 --- a/tests/phpunit/api/v3/MembershipTest.php +++ b/tests/phpunit/api/v3/MembershipTest.php @@ -23,7 +23,7 @@ | GNU Affero General Public License or the licensing of CiviCRM, | | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ -*/ + */ /** * Test APIv3 civicrm_membership functions @@ -626,9 +626,9 @@ class api_v3_MembershipTest extends CiviUnitTestCase { $this->assertEquals($result['id'], $result['values'][$result['id']]['id'], " in line " . __LINE__); } - /* - * Check for useful message if contact doesn't exist - */ + /** + * Check for useful message if contact doesn't exist + */ public function testMembershipCreateWithInvalidContact() { $params = array( 'contact_id' => 999, @@ -833,7 +833,7 @@ class api_v3_MembershipTest extends CiviUnitTestCase { /** * per CRM-15746 check that the id can be altered in an update hook */ - function testMembershipUpdateCreateHookCRM15746() { + public function testMembershipUpdateCreateHookCRM15746() { $this->hookClass->setHook('civicrm_pre', array($this, 'hook_civicrm_pre_update_create_membership')); $result = $this->callAPISuccess('membership', 'create', $this->_params); $this->callAPISuccess('membership', 'create', array('id' => $result['id'], 'end_date' => '1 year ago')); @@ -843,7 +843,7 @@ class api_v3_MembershipTest extends CiviUnitTestCase { $this->callAPISuccessGetCount('membership', array(), 2); } - function hook_civicrm_pre_update_create_membership($op, $objectName, $id, &$params) { + public function hook_civicrm_pre_update_create_membership($op, $objectName, $id, &$params) { if ($objectName == 'Membership' && $op == 'edit') { $existingMembership = $this->callAPISuccessGetSingle('membership', array('id' => $params['id'])); unset($params['id'], $params['membership_id']); @@ -1032,4 +1032,5 @@ class api_v3_MembershipTest extends CiviUnitTestCase { $this->assertEquals('2009-12-21', $result['end_date']); } + }