Passed
Pull Request — master (#11)
by Michel
02:36
created

ExprTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 31
rs 10
c 0
b 0
f 0
wmc 3
lcom 1
cbo 2

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A testGetQuery() 0 4 1
A testJsonSerialize() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace TBolier\RethinkQL\UnitTest\Query;
5
6
use PHPUnit\Framework\TestCase;
7
use TBolier\RethinkQL\Query\Expr;
8
9
class ExprTest extends TestCase
10
{
11
    /**
12
     * @var Expr
13
     */
14
    private $expr;
15
16
    /**
17
     * @return void
18
     */
19
    public function setUp(): void
20
    {
21
        $this->expr = new Expr('foo');
22
    }
23
24
    /**
25
     * @return void
26
     */
27
    public function testGetQuery(): void
28
    {
29
        $this->assertEquals('foo', $this->expr->getQuery());
30
    }
31
32
    /**
33
     * @return void
34
     */
35
    public function testJsonSerialize(): void
36
    {
37
        $this->assertEquals('foo', $this->expr->jsonSerialize());
38
    }
39
}
40