Build query using CRM_Utils_SQL_Select.
[civicrm-core.git] / tests / phpunit / api / v3 / MembershipTest.php
index 8c0fbdc6a725374c57d1844edd0ff2c99d0b2401..aa5d0937a20e895b0f81722d0c9924c1fa245864 100644 (file)
@@ -580,6 +580,11 @@ class api_v3_MembershipTest extends CiviUnitTestCase {
     $result = $this->callAPISuccess('membership', 'get', $params);
     $this->assertEquals(1, $result['count']);
 
+    // Delete relationship and assert membership is not inherited
+    $this->callAPISuccess('relationship', 'delete', array('id' => $relationship1['id']));
+    $result = $this->callAPISuccess('membership', 'get', $params);
+    $this->assertEquals(0, $result['count']);
+
     // Tear down - reverse of creation to be safe
     $this->contactDelete($memberContactId[2]);
     $this->contactDelete($memberContactId[1]);