| @@ 92-101 (lines=10) @@ | ||
| 89 | /** |
|
| 90 | * @depends testCreateDatabase |
|
| 91 | */ |
|
| 92 | public function testAddDocumentToDatabase() |
|
| 93 | { |
|
| 94 | $db = new HTTP\SocketClient(); |
|
| 95 | ||
| 96 | $response = $db->request( 'PUT', '/' . $this->getTestDatabase() . '/123', '{"_id":"123","data":"Foo"}' ); |
|
| 97 | ||
| 98 | $this->assertInstanceOf('Doctrine\CouchDB\HTTP\Response', $response); |
|
| 99 | ||
| 100 | $this->assertTrue($response->body['ok']); |
|
| 101 | } |
|
| 102 | ||
| 103 | /** |
|
| 104 | * @depends testCreateDatabase |
|
| @@ 241-250 (lines=10) @@ | ||
| 238 | /** |
|
| 239 | * @depends testCreateDatabase |
|
| 240 | */ |
|
| 241 | public function testDeleteDatabase() |
|
| 242 | { |
|
| 243 | $db = new HTTP\SocketClient(); |
|
| 244 | ||
| 245 | $response = $db->request( 'DELETE', '/' . $this->getTestDatabase() ); |
|
| 246 | ||
| 247 | $this->assertInstanceOf('Doctrine\CouchDB\HTTP\Response', $response); |
|
| 248 | ||
| 249 | $this->assertTrue($response->body['ok']); |
|
| 250 | } |
|
| 251 | ||
| 252 | /** |
|
| 253 | * @depends testCreateDatabase |
|
| @@ 107-116 (lines=10) @@ | ||
| 104 | /** |
|
| 105 | * @depends testCreateDatabase |
|
| 106 | */ |
|
| 107 | public function testAddDocumentToDatabase() |
|
| 108 | { |
|
| 109 | $db = new HTTP\StreamClient(); |
|
| 110 | ||
| 111 | $response = $db->request( 'PUT', '/' . $this->getTestDatabase() . '/123', '{"_id":"123","data":"Foo"}' ); |
|
| 112 | ||
| 113 | $this->assertInstanceOf('Doctrine\CouchDB\HTTP\Response', $response); |
|
| 114 | ||
| 115 | $this->assertTrue($response->body['ok']); |
|
| 116 | } |
|
| 117 | ||
| 118 | /** |
|
| 119 | * @depends testCreateDatabase |
|
| @@ 255-264 (lines=10) @@ | ||
| 252 | /** |
|
| 253 | * @depends testCreateDatabase |
|
| 254 | */ |
|
| 255 | public function testDeleteDatabase() |
|
| 256 | { |
|
| 257 | $db = new HTTP\StreamClient(); |
|
| 258 | ||
| 259 | $response = $db->request( 'DELETE', '/' . $this->getTestDatabase() . '' ); |
|
| 260 | ||
| 261 | $this->assertInstanceOf('Doctrine\CouchDB\HTTP\Response', $response); |
|
| 262 | ||
| 263 | $this->assertTrue($response->body['ok']); |
|
| 264 | } |
|
| 265 | ||
| 266 | /** |
|
| 267 | * @depends testCreateDatabase |
|