}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
- Civi::cache('fields')->flush();
- // reset ACL and system caches.
- CRM_Core_BAO_Cache::resetCaches();
-
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue('CRM_ACL_DAO_ACL', $id, 'is_active', $is_active);
}
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue(__CLASS__, $id, 'is_active', $is_active);
}
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_PrintLabel', $id, 'is_active', $is_active);
}
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue('CRM_Campaign_DAO_Campaign', $id, 'is_active', $is_active);
}
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue('CRM_Campaign_DAO_Survey', $id, 'is_active', $is_active);
}
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
$params = ['id' => $id];
self::retrieve($params, $contactinfo);
$params = ['name' => "New $contactinfo[name]"];
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $isActive
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $isActive) {
return CRM_Core_DAO::setFieldValue('CRM_Contact_DAO_Group', $id, 'is_active', $isActive);
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue('CRM_Contact_DAO_RelationshipType', $id, 'is_active', $is_active);
}
}
/**
- * Update the is_active flag in the db.
- *
* @deprecated - this bypasses hooks.
- *
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue('CRM_Contribute_DAO_ContributionPage', $id, 'is_active', $is_active);
}
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue('CRM_Contribute_DAO_Premium', $id, 'premiums_active ', $is_active);
}
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
if (!$is_active) {
$dao = new CRM_Contribute_DAO_PremiumsProduct();
$dao->product_id = $id;
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_ActionSchedule', $id, 'is_active', $is_active);
}
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
-
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
CRM_Utils_System::flushCache();
//enable-disable CustomField
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
// reset the cache
Civi::cache('fields')->flush();
// reset ACL and system caches.
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_Job', $id, 'is_active', $is_active);
}
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_LocationType', $id, 'is_active', $is_active);
}
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_MessageTemplate', $id, 'is_active', $is_active);
}
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_Navigation', $id, 'is_active', $is_active);
}
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_OptionGroup', $id, 'is_active', $is_active);
}
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_OptionValue', $id, 'is_active', $is_active);
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
//check if custom data profile field is disabled
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_UFGroup', $id, 'is_active', $is_active);
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue('CRM_Event_DAO_Event', $id, 'is_active', $is_active);
}
}
/**
+ * @deprecated - this bypasses hooks.
* @param int $id
- * @param $isActive
- *
+ * @param bool $isActive
* @return bool
*/
public static function setIsActive($id, $isActive) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue('CRM_Event_BAO_ParticipantStatusType', $id, 'is_active', $isActive);
}
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue('CRM_Financial_DAO_FinancialAccount', $id, 'is_active', $is_active);
}
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue('CRM_Financial_DAO_FinancialType', $id, 'is_active', $is_active);
}
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue('CRM_Financial_DAO_PaymentProcessor', $id, 'is_active', $is_active);
}
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Financial_DAO_PaymentProcessorType', $id, 'is_active', $is_active);
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue('CRM_Mailing_DAO_MailingComponent', $id, 'is_active', $is_active);
}
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue('CRM_Member_DAO_MembershipStatus', $id, 'is_active', $is_active);
}
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue('CRM_Member_DAO_MembershipType', $id, 'is_active', $is_active);
}
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Price_DAO_PriceField', $id, 'is_active', $is_active);
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
* @param bool $is_active
- * Value we want to set the is_active field.
- *
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Price_DAO_PriceFieldValue', $id, 'is_active', $is_active);
}
/**
- * Update the is_active flag in the db.
- *
+ * @deprecated - this bypasses hooks.
* @param int $id
- * Id of the database record.
- * @param $isActive
- *
+ * @param bool $isActive
* @return bool
- * true if we found and updated the object, else false
*/
public static function setIsActive($id, $isActive) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue('CRM_Price_DAO_PriceSet', $id, 'is_active', $isActive);
}
}
/**
+ * @deprecated - this bypasses hooks.
* @param int $id
- * @param $is_active
- *
+ * @param bool $is_active
* @return bool
*/
public static function setIsActive($id, $is_active) {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return CRM_Core_DAO::setFieldValue('CRM_SMS_DAO_Provider', $id, 'is_active', $is_active);
}
$this->callAPISuccess('ContributionPage', 'delete', ['id' => $contributionpage->id]);
}
- /**
- * test setIsActive() method
- */
- public function testsetIsActive() {
-
- $params = [
- 'title' => 'Test Contribution Page',
- 'financial_type_id' => self::FINANCIAL_TYPE_ID,
- 'is_active' => 1,
- ];
-
- $contributionpage = CRM_Contribute_BAO_ContributionPage::create($params);
- $id = $contributionpage->id;
- $is_active = 1;
- $pageActive = CRM_Contribute_BAO_ContributionPage::setIsActive($id, $is_active);
- $this->assertEquals($pageActive, TRUE, 'Verify financial types record deletion.');
- $this->callAPISuccess('ContributionPage', 'delete', ['id' => $contributionpage->id]);
- }
-
/**
* Test setValues() method
*/
$this->assertEquals($result, 'Donations', 'Verify financial type name.');
}
- /**
- * Check method setIsActive()
- */
- public function testSetIsActive() {
- $params = [
- 'name' => 'Donations',
- 'is_deductible' => 0,
- 'is_active' => 1,
- ];
- $contributionType = CRM_Financial_BAO_FinancialType::writeRecord($params);
- $result = CRM_Financial_BAO_FinancialType::setIsActive($contributionType->id, 0);
- $this->assertEquals($result, TRUE, 'Verify financial type record updation for is_active.');
-
- $isActive = $this->assertDBNotNull('CRM_Financial_BAO_FinancialType', $contributionType->id,
- 'is_active', 'id',
- 'Database check on updated for financial type is_active.'
- );
- $this->assertEquals($isActive, 0, 'Verify financial types is_active.');
- }
-
}
$this->assertEquals(empty($result), FALSE, 'Verify products record.');
}
- /**
- * Check method setIsActive( )
- */
- public function testSetIsActive() {
- $params = [
- 'name' => 'Test Product',
- 'sku' => 'TP-10',
- 'imageOption' => 'noImage',
- 'price' => 12,
- 'cost' => 5,
- 'min_contribution' => 5,
- 'is_active' => 1,
- ];
-
- $product = CRM_Contribute_BAO_Product::create($params);
- CRM_Contribute_BAO_Product::setIsActive($product->id, 0);
-
- $isActive = $this->assertDBNotNull('CRM_Contribute_BAO_Product', $product->id,
- 'is_active', 'id',
- 'Database check on updated for product records is_active.'
- );
-
- $this->assertEquals($isActive, 0, 'Verify product records is_active.');
- }
-
/**
* Check method del( )
*/
$this->getAndCheck($groupParams, $customGroup['id'], 'CustomGroup');
}
- /**
- * Test setIsActive()
- */
- public function testSetIsActive() {
- $customGroupTitle = 'My Custom Group';
- $groupParams = [
- 'title' => $customGroupTitle,
- 'name' => 'my_custom_group',
- 'style' => 'Tab',
- 'extends' => 'Individual',
- 'is_active' => 0,
- ];
-
- $customGroup = $this->customGroupCreate($groupParams);
- $customGroupId = $customGroup['id'];
-
- //update is_active
- $result = CRM_Core_BAO_CustomGroup::setIsActive($customGroupId, TRUE);
-
- //check for object update
- $this->assertEquals(TRUE, $result);
- //check for is_active
- $this->assertDBCompareValue('CRM_Core_DAO_CustomGroup', $customGroupId, 'is_active', 'id', 1,
- 'Database check for custom group is_active field.'
- );
-
- $this->customGroupDelete($customGroup['id']);
- }
-
/**
* Test getGroupDetail() with Empty Params
*/
}
}
- /**
- * SetIsActive() method of participant status type
- */
- public function testSetIsActiveStatusType() {
-
- $params = [
- 'name' => 'testStatus',
- 'label' => 'testParticipant',
- 'class' => 'Positive',
- 'is_active' => 0,
- 'is_counted' => 1,
- 'weight' => 15,
- 'visibility_id' => 1,
- ];
-
- $statusType = CRM_Event_BAO_ParticipantStatusType::create($params);
- $isActive = 1;
-
- // set participant status type active
- CRM_Event_BAO_ParticipantStatusType::setIsActive($statusType->id, $isActive);
-
- // compare expected value in db
- $this->assertDBCompareValue('CRM_Event_DAO_ParticipantStatusType', $statusType->id, 'is_Active',
- 'id', $isActive, 'Check DB for is_Active value'
- );
- }
-
}
$this->assertEquals($result->name, 'Donations', 'Verify financial account name.');
}
- /**
- * Check method setIsActive()
- */
- public function testSetIsActive() {
- $params = [
- 'name' => 'Donations',
- 'is_deductible' => 0,
- 'is_active' => 1,
- ];
- $financialAccount = CRM_Financial_BAO_FinancialAccount::writeRecord($params);
- $result = CRM_Financial_BAO_FinancialAccount::setIsActive($financialAccount->id, 0);
- $this->assertEquals($result, TRUE, 'Verify financial account record updation for is_active.');
-
- $isActive = $this->assertDBNotNull(
- 'CRM_Financial_BAO_FinancialAccount',
- $financialAccount->id,
- 'is_active',
- 'id',
- 'Database check on updated for financial account is_active.'
- );
- $this->assertEquals($isActive, 0, 'Verify financial account is_active.');
- }
-
/**
* Check method del()
*
parent::tearDown();
}
- /**
- * Check method setIsActive().
- *
- * @throws \CRM_Core_Exception
- */
- public function testSetIsActive(): void {
- $financialTypeID = FinancialType::create()->setValues([
- 'name' => 'Donations',
- 'is_deductible' => 0,
- 'is_active' => 1,
- ])->execute()->first()['id'];
- $result = CRM_Financial_BAO_FinancialType::setIsActive($financialTypeID, 0);
- $this->assertEquals(TRUE, $result, 'Verify financial type record updated for is_active.');
- $isActive = $this->assertDBNotNull(
- 'CRM_Financial_DAO_FinancialType',
- $financialTypeID,
- 'is_active',
- 'id',
- 'Database check on updated for financial type is_active.'
- );
- $this->assertEquals(0, $isActive, 'Verify financial types is_active.');
- }
-
/**
* Delete test for testGitLabIssue1108.
*
$this->assertEquals($result, 'Changed Status', 'Verify updated membership status label From PseudoConstant.');
}
- public function testSetIsActive() {
-
- $params = [
- 'name' => 'added',
- 'is_active' => 1,
- ];
-
- $this->ids['MembershipStatus'][0] = $this->callAPISuccess('MembershipStatus', 'create', $params)['id'];
- $result = CRM_Member_BAO_MembershipStatus::setIsActive($this->ids['MembershipStatus'][0], 0);
- $this->assertEquals($result, TRUE, 'Verify membership status record updated.');
-
- $isActive = $this->assertDBNotNull('CRM_Member_BAO_MembershipStatus', $this->ids['MembershipStatus'][0],
- 'is_active', 'id',
- 'Database check on updated membership status record.'
- );
- $this->assertEquals($isActive, 0, 'Verify membership status is_active.');
- }
-
public function testGetMembershipStatus() {
$params = [
'name' => 'added',
$this->assertEquals('General', $result->name, 'Verify membership type name.');
}
- /**
- * Test setIsActive.
- *
- * @throws \CRM_Core_Exception
- */
- public function testSetIsActive(): void {
- $params = [
- 'name' => 'General',
- 'description' => NULL,
- 'domain_id' => 1,
- 'minimum_fee' => 100,
- 'duration_unit' => 'year',
- 'period_type' => 'fixed',
- 'duration_interval' => 1,
- 'member_of_contact_id' => $this->ids['Contact']['organization'],
- 'financial_type_id:name' => 'Donation',
- 'relationship_type_id' => $this->ids['RelationshipType'][0],
- 'visibility' => 'Public',
- 'is_active' => 1,
- ];
- $membershipID = MembershipType::create()->setValues($params)->execute()->first()['id'];
-
- CRM_Member_BAO_MembershipType::setIsActive($membershipID, 0);
-
- $isActive = $this->assertDBNotNull('CRM_Member_BAO_MembershipType', $membershipID,
- 'is_active', 'id',
- 'Database check on membership type status.'
- );
- $this->assertEquals(0, $isActive, 'Verify membership type status.');
- }
-
/**
* Test delete.
*