));
$this->assertEquals(1, $logs['count']);
$this->assertEquals($stateOfGrace, $membership['status_id']);
- $this->callAPISuccess('contribution', 'completetransaction', array('id' => $this->_ids['contribution']));
+ $contribution = $this->callAPISuccess('contribution', 'completetransaction', array('id' => $this->_ids['contribution']));
$membership = $this->callAPISuccess('membership', 'getsingle', array('id' => $this->_ids['membership']));
$this->assertEquals(date('Y-m-d', strtotime('yesterday + 1 year')), $membership['end_date']);
$this->callAPISuccessGetSingle('LineItem', array(
$logs = $this->callAPISuccess('MembershipLog', 'get', array(
'membership_id' => $this->_ids['membership'],
));
+ //CRM-19600: Ensure that 'Membership Renewal' activity is created after successful membership regsitration
+ $activity = $this->callAPISuccess('Activity', 'get', array(
+ 'activity_type_id' => 'Membership Renewal',
+ 'source_record_id' => $contribution['id'],
+ ));
+ $this->assertEquals(1, $activity['count']);
$this->assertEquals(2, $logs['count']);
$this->assertNotEquals($stateOfGrace, $logs['values'][2]['status_id']);
$this->cleanUpAfterPriceSets();