Passed
Pull Request — master (#376)
by Wilmer
03:08 queued 33s
created

AndConditionsTest::testGetOperator()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
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\AndCondition;
9
10
/**
11
 * @group db
12
 */
13
final class AndConditionsTest extends TestCase
14
{
15
    public function testConstructor(): void
16
    {
17
        $condition = new AndCondition(['a' => 1, 'b' => 2]);
18
        $this->assertSame(['a' => 1, 'b' => 2], $condition->getExpressions());
19
    }
20
21
    public function testGetOperator(): void
22
    {
23
        $condition = new AndCondition(['a' => 1, 'b' => 2]);
24
        $this->assertSame('AND', $condition->getOperator());
25
    }
26
}
27