From f0191689d7d95089e6d9e9079de25d5919f3c749 Mon Sep 17 00:00:00 2001 From: Andrew Hunt Date: Mon, 18 Mar 2019 17:21:06 -0400 Subject: [PATCH] CiviMember: test renaming `expired` doesn't trip up status update --- tests/phpunit/CRM/Member/BAO/MembershipStatusTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/phpunit/CRM/Member/BAO/MembershipStatusTest.php b/tests/phpunit/CRM/Member/BAO/MembershipStatusTest.php index fa118e1373..79c2ecac93 100644 --- a/tests/phpunit/CRM/Member/BAO/MembershipStatusTest.php +++ b/tests/phpunit/CRM/Member/BAO/MembershipStatusTest.php @@ -131,6 +131,14 @@ class CRM_Member_BAO_MembershipStatusTest extends CiviUnitTestCase { } public function testExpiredDisabled() { + $result = civicrm_api3('MembershipStatus', 'get', [ + 'name' => "Expired", + 'api.MembershipStatus.create' => ['label' => 'Expiiiired'], + ]); + + // Calling it 'Expiiiired' is OK. + $result = $this->callAPISuccess('job', 'process_membership', []); + $result = civicrm_api3('MembershipStatus', 'get', [ 'name' => "Expired", 'api.MembershipStatus.create' => ['is_active' => 0], -- 2.25.1