예제 #1
0
 /**
  * @param array $data
  * @dataProvider fullLeadProvider
  */
 public function testCreateDynamicLead($data)
 {
     $hydratedLead = new Lead($data);
     $dynamicLead = new Lead();
     $dynamicLead->setId($data['id']);
     $dynamicLead->setStatusId($data['status_id']);
     $dynamicLead->setStatusLabel($data['status_label']);
     $dynamicLead->setDescription($data['description']);
     $dynamicLead->setDisplayName($data['display_name']);
     $dynamicLead->setAddresses($data['addresses']);
     $dynamicLead->setOrganization($data['organization']);
     $dynamicLead->setCreatedBy($data['created_by']);
     $dynamicLead->setUrl($data['url']);
     $dynamicLead->setTasks($data['tasks']);
     $dynamicLead->setName($data['name']);
     $dynamicLead->setContacts($data['contacts']);
     $dynamicLead->setDateCreated($data['date_created']);
     $dynamicLead->setCustom($data['custom']);
     $dynamicLead->setUpdatedByName($data['updated_by_name']);
     $dynamicLead->setCreatedByName($data['created_by_name']);
     $dynamicLead->setOpportunities($data['opportunities']);
     $dynamicLead->setHtmlUrl($data['html_url']);
     $dynamicLead->setUpdatedBy($data['updated_by']);
     $dynamicLead->setDateUpdated($data['date_updated']);
     $dynamicLead->setOrganizationId($data['organization_id']);
     $dynamicLead = json_decode(json_encode($dynamicLead));
     $hydratedLead = json_decode(json_encode($hydratedLead));
     $this->assertTrue($hydratedLead == $dynamicLead);
 }