| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 26 | 
| Code Lines | 17 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 16 | public function testDeleteDocument() | ||
| 17 |     { | ||
| 18 | $this->r() | ||
| 19 |             ->table('tabletest') | ||
| 20 | ->insert([ | ||
| 21 | 'title' => 'Delete document', | ||
| 22 | ]) | ||
| 23 | ->run(); | ||
| 24 | |||
| 25 | /** @var ResponseInterface $count */ | ||
| 26 | $count = $this->r() | ||
| 27 |             ->table('tabletest') | ||
| 28 | ->filter(['title' => 'Delete document']) | ||
| 29 | ->count() | ||
| 30 | ->run(); | ||
| 31 | |||
| 32 |         $this->assertInternalType('int', $count->getData()); | ||
| 33 | |||
| 34 | /** @var ResponseInterface $res */ | ||
| 35 | $res = $this->r() | ||
| 36 |             ->table('tabletest') | ||
| 37 | ->filter(['title' => 'Delete document']) | ||
| 38 | ->delete() | ||
| 39 | ->run(); | ||
| 40 | |||
| 41 | $this->assertObStatus(['deleted' => $count->getData()], $res->getData()); | ||
| 42 | } | ||
| 44 |