| @@ 81-104 (lines=24) @@ | ||
| 78 | * @depends testCreate |
|
| 79 | * @depends testGet |
|
| 80 | */ |
|
| 81 | public function testUpdate(array $request) |
|
| 82 | { |
|
| 83 | $request['account']['name'] .= "_Updated"; |
|
| 84 | $this->client->request( |
|
| 85 | 'PUT', |
|
| 86 | $this->getUrl('oro_api_put_account', array('id' => $request['id'])), |
|
| 87 | $request |
|
| 88 | ); |
|
| 89 | $result = $this->client->getResponse(); |
|
| 90 | ||
| 91 | $this->assertEmptyResponseStatusCodeEquals($result, 204); |
|
| 92 | ||
| 93 | $this->client->request( |
|
| 94 | 'GET', |
|
| 95 | $this->getUrl('oro_api_get_account', array('id' => $request['id'])) |
|
| 96 | ); |
|
| 97 | ||
| 98 | $result = $this->getJsonResponseContent($this->client->getResponse(), 200); |
|
| 99 | ||
| 100 | $this->assertEquals( |
|
| 101 | $request['account']['name'], |
|
| 102 | $result['name'] |
|
| 103 | ); |
|
| 104 | } |
|
| 105 | ||
| 106 | /** |
|
| 107 | * @param array $request |
|
| @@ 91-114 (lines=24) @@ | ||
| 88 | * @depends testCreate |
|
| 89 | * @depends testGet |
|
| 90 | */ |
|
| 91 | public function testUpdate(array $request) |
|
| 92 | { |
|
| 93 | $request['call']['subject'] .= "_Updated"; |
|
| 94 | $this->client->request( |
|
| 95 | 'PUT', |
|
| 96 | $this->getUrl('oro_api_put_call', array('id' => $request['id'])), |
|
| 97 | $request |
|
| 98 | ); |
|
| 99 | $result = $this->client->getResponse(); |
|
| 100 | ||
| 101 | $this->assertEmptyResponseStatusCodeEquals($result, 204); |
|
| 102 | ||
| 103 | $this->client->request( |
|
| 104 | 'GET', |
|
| 105 | $this->getUrl('oro_api_get_call', array('id' => $request['id'])) |
|
| 106 | ); |
|
| 107 | ||
| 108 | $result = $this->getJsonResponseContent($this->client->getResponse(), 200); |
|
| 109 | ||
| 110 | $this->assertEquals( |
|
| 111 | $request['call']['subject'], |
|
| 112 | $result['subject'] |
|
| 113 | ); |
|
| 114 | } |
|
| 115 | ||
| 116 | /** |
|
| 117 | * @param array $request |
|