diff --git a/tests/phpunit/api/v3/RelationshipTest.php b/tests/phpunit/api/v3/RelationshipTest.php index 963a5bdd5d9b..ae69fe29748c 100644 --- a/tests/phpunit/api/v3/RelationshipTest.php +++ b/tests/phpunit/api/v3/RelationshipTest.php @@ -1357,8 +1357,10 @@ public function testCreateRelatedMembership($version) { ]); $this->callAPISuccessGetCount('membership', ['contact_id' => $this->_cId_a_2], 0); + $this->_apiversion = 4; // Deleting the organization should cause the related membership to be deleted. - $this->callAPISuccess('contact', 'delete', ['id' => $this->_cId_b]); + $this->callAPISuccess('Contact', 'delete', ['id' => $this->_cId_b]); + $this->_apiversion = 3; $this->callAPISuccessGetCount('membership', ['contact_id' => $this->_cId_a], 0); }