| @@ 42-61 (lines=20) @@ | ||
| 39 | ); |
|
| 40 | } |
|
| 41 | ||
| 42 | public function testCreateOrUpdateDocument() |
|
| 43 | { |
|
| 44 | $document = DocumentFixtures::getAgentProfileDocument(); |
|
| 45 | $profile = $document->getAgentProfile(); |
|
| 46 | ||
| 47 | $this->validateStoreApiCall( |
|
| 48 | 'post', |
|
| 49 | 'agents/profile', |
|
| 50 | array( |
|
| 51 | 'agent' => 'agent-as-json', |
|
| 52 | 'profileId' => 'profile-id', |
|
| 53 | ), |
|
| 54 | 204, |
|
| 55 | '', |
|
| 56 | $document->getData(), |
|
| 57 | array(array('data' => $profile->getAgent(), 'result' => 'agent-as-json')) |
|
| 58 | ); |
|
| 59 | ||
| 60 | $this->client->createOrUpdateDocument($document); |
|
| 61 | } |
|
| 62 | ||
| 63 | public function testCreateOrReplaceDocument() |
|
| 64 | { |
|
| @@ 63-82 (lines=20) @@ | ||
| 60 | $this->client->createOrUpdateDocument($document); |
|
| 61 | } |
|
| 62 | ||
| 63 | public function testCreateOrReplaceDocument() |
|
| 64 | { |
|
| 65 | $document = DocumentFixtures::getAgentProfileDocument(); |
|
| 66 | $profile = $document->getAgentProfile(); |
|
| 67 | ||
| 68 | $this->validateStoreApiCall( |
|
| 69 | 'put', |
|
| 70 | 'agents/profile', |
|
| 71 | array( |
|
| 72 | 'agent' => 'agent-as-json', |
|
| 73 | 'profileId' => 'profile-id', |
|
| 74 | ), |
|
| 75 | 204, |
|
| 76 | '', |
|
| 77 | $document->getData(), |
|
| 78 | array(array('data' => $profile->getAgent(), 'result' => 'agent-as-json')) |
|
| 79 | ); |
|
| 80 | ||
| 81 | $this->client->createOrReplaceDocument($document); |
|
| 82 | } |
|
| 83 | ||
| 84 | public function testDeleteDocument() |
|
| 85 | { |
|