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