Passed
Pull Request — master (#376)
by Alexander
05:11 queued 02:37
created

AndConditionsTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 5
c 3
b 0
f 0
dl 0
loc 14
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetOperator() 0 5 1
A testConstructor() 0 5 1
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
        $andCondition = new AndCondition(['a' => 1, 'b' => 2]);
18
19
        $this->assertSame(['a' => 1, 'b' => 2], $andCondition->getExpressions());
20
    }
21
22
    public function testGetOperator(): void
23
    {
24
        $andCondition = new AndCondition(['a' => 1, 'b' => 2]);
25
26
        $this->assertSame('AND', $andCondition->getOperator());
27
    }
28
}
29