| @@ 146-153 (lines=8) @@ | ||
| 143 | $this->assertEquals($originalRecord->getTotalPrice(), $record->getTotalPrice()); |
|
| 144 | } |
|
| 145 | ||
| 146 | public function testDeleteAction() { |
|
| 147 | $record = $this->records[0]; |
|
| 148 | $id = $record->getId(); |
|
| 149 | $this->client->request('DELETE', '/orders/'.$id.'.json'); |
|
| 150 | $this->assertEquals("204", $this->client->getResponse()->getStatusCode()); |
|
| 151 | $repo = $this->client->getContainer()->get('doctrine_mongodb.odm.default_document_manager')->getRepository('TestTestBundle:Order'); |
|
| 152 | $this->assertNull($repo->find($id)); |
|
| 153 | } |
|
| 154 | } |
|
| @@ 188-195 (lines=8) @@ | ||
| 185 | $this->assertEquals($originalRecord->getPlateNumber(), $record->getPlateNumber()); |
|
| 186 | } |
|
| 187 | ||
| 188 | public function testDeleteAction() { |
|
| 189 | $record = $this->records[0]; |
|
| 190 | $id = $record->getId(); |
|
| 191 | $this->client->request('DELETE', '/cars/'.$id.'.json'); |
|
| 192 | $this->assertEquals("204", $this->client->getResponse()->getStatusCode()); |
|
| 193 | $repo = $this->client->getContainer()->get('doctrine.orm.default_entity_manager')->getRepository('TestTestBundle:Car'); |
|
| 194 | $this->assertNull($repo->find($id)); |
|
| 195 | } |
|
| 196 | } |
|