@@ 24-38 (lines=15) @@ | ||
21 | ]); |
|
22 | } |
|
23 | ||
24 | public function testCreateContactEmail() |
|
25 | { |
|
26 | $contact = $this->getReference('Contact_' . LoadContactEntitiesData::THIRD_ENTITY_NAME); |
|
27 | $content = json_encode([ |
|
28 | 'contactId' => $contact->getId(), |
|
29 | 'email' =>'[email protected]', |
|
30 | 'primary' => true |
|
31 | ]); |
|
32 | ||
33 | $this->client->request('POST', $this->getUrl('oro_api_post_contact_email'), [], [], [], $content); |
|
34 | $contact = $this->getJsonResponseContent($this->client->getResponse(), Codes::HTTP_CREATED); |
|
35 | ||
36 | $this->assertArrayHasKey('id', $contact); |
|
37 | $this->assertNotEmpty($contact['id']); |
|
38 | } |
|
39 | ||
40 | public function testCreateSecondPrimaryEmail() |
|
41 | { |
@@ 26-39 (lines=14) @@ | ||
23 | ]); |
|
24 | } |
|
25 | ||
26 | public function testCreateContactPhone() |
|
27 | { |
|
28 | $contact = $this->getReference('Contact_'. LoadContactEntitiesData::THIRD_ENTITY_NAME); |
|
29 | $content = json_encode([ |
|
30 | 'contactId' => $contact->getId(), |
|
31 | 'phone' => '111', |
|
32 | 'primary' => true |
|
33 | ]); |
|
34 | $this->client->request('POST', $this->getUrl('oro_api_post_contact_phone'), [], [], [], $content); |
|
35 | $contact = $this->getJsonResponseContent($this->client->getResponse(), Codes::HTTP_CREATED); |
|
36 | ||
37 | $this->assertArrayHasKey('id', $contact); |
|
38 | $this->assertNotEmpty($contact['id']); |
|
39 | } |
|
40 | ||
41 | public function testCreateSecondPrimaryPhone() |
|
42 | { |