From: Eileen McNaughton Date: Sat, 14 Aug 2021 00:51:14 +0000 (+1200) Subject: dev/core#2757 test to demonstrate contact delete actions not called for v4 api X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=84943d35ebf93909cc4a29fe4c0f9ea68cfb30f2;p=civicrm-core.git dev/core#2757 test to demonstrate contact delete actions not called for v4 api --- diff --git a/tests/phpunit/api/v3/RelationshipTest.php b/tests/phpunit/api/v3/RelationshipTest.php index 4d23fcb057..3d09f5a277 100644 --- a/tests/phpunit/api/v3/RelationshipTest.php +++ b/tests/phpunit/api/v3/RelationshipTest.php @@ -1335,11 +1335,6 @@ class api_v3_RelationshipTest extends CiviUnitTestCase { ]); $this->callAPISuccessGetCount('membership', ['contact_id' => $this->_cId_a_2], 0); - // @todo - this is actually mimicing an accidental test set up from earlier. - // there is a legit bug whereby apiv4 contact.delete is - // somehow bypassing Membership cleanup. - // https://lab.civicrm.org/dev/core/-/issues/2757 - $this->_apiversion = 3; // Deleting the organization should cause the related membership to be deleted. $this->callAPISuccess('Contact', 'delete', ['id' => $mainContactID]); $this->callAPISuccessGetCount('Membership', ['contact_id' => $this->_cId_a], 0); @@ -1350,7 +1345,7 @@ class api_v3_RelationshipTest extends CiviUnitTestCase { * * @throws \CRM_Core_Exception */ - public function testRelationshipCreateWithEmployerData() { + public function testRelationshipCreateWithEmployerData(): void { // CASE A: Create a current employee relationship without setting end date, ensure that employer field is set $params = [ 'relationship_type_id' => '5_a_b',