Passed
Push — master ( 2f6a1e...868687 )
by Timon
04:41
created

EmptyTableTest::testEmptyTable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 21
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 21
rs 9.3142
c 0
b 0
f 0
cc 1
eloc 12
nc 1
nop 0
1
<?php
2
declare(strict_types = 1);
3
4
namespace TBolier\RethinkQL\IntegrationTest\Query;
5
6
use TBolier\RethinkQL\Response\ResponseInterface;
7
8
class EmptyTableTest extends AbstractTableTest
9
{
10
    /**
11
     * @throws \Exception
12
     */
13
    public function testEmptyTable()
14
    {
15
        /** @var ResponseInterface $count */
16
        $count = $this->r()
17
            ->table('tabletest')
18
            ->filter(['title' => 'Test document'])
19
            ->count()
20
            ->run();
21
22
        $this->assertInternalType('int', $count->getData());
23
24
        $res = $this->r()
25
            ->table('tabletest')
26
            ->delete()
27
            ->run();
28
29
        $this->assertObStatus(['deleted' => $count->getData()], $res->getData());
30
    }
31
}
32