diff --git a/tests/phpunit/api/v3/MembershipTest.php b/tests/phpunit/api/v3/MembershipTest.php index 626195a2ca6b..3738afe92814 100644 --- a/tests/phpunit/api/v3/MembershipTest.php +++ b/tests/phpunit/api/v3/MembershipTest.php @@ -852,7 +852,7 @@ public function testMembershipCreateWithId() { //Update Status and check activities created. $updateStatus = array( 'id' => $result['id'], - 'status_id' => 6, + 'status_id' => CRM_Core_PseudoConstant::getKey('CRM_Member_BAO_Membership', 'status_id', 'Cancelled'), ); $this->callAPISuccess('Membership', 'create', $updateStatus); $activities = CRM_Activity_BAO_Activity::getContactActivity($this->_contactID);