Passed
Pull Request — master (#376)
by Wilmer
02:38
created

BetweenConditionTest::testConstructor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 7
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Db\Tests\QueryBuilder\Conditions;
6
7
use PHPUnit\Framework\TestCase;
8
use Yiisoft\Db\QueryBuilder\Conditions\BetweenCondition;
9
10
/**
11
 * @group db
12
 */
13
final class BetweenConditionTest extends TestCase
14
{
15
    public function testConstructor(): void
16
    {
17
        $condition = new BetweenCondition('date', 'BETWEEN', 1, 2);
18
        $this->assertSame('date', $condition->getColumn());
19
        $this->assertSame('BETWEEN', $condition->getOperator());
20
        $this->assertSame(1, $condition->getIntervalStart());
21
        $this->assertSame(2, $condition->getIntervalEnd());
22
    }
23
}
24