Passed
Pull Request — master (#380)
by Wilmer
03:09
created

CheckConstraintTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 11
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGetExpression() 0 9 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Db\Tests\Constraint;
6
7
use PHPUnit\Framework\TestCase;
8
use Yiisoft\Db\Constraint\CheckConstraint;
9
10
/**
11
 * @group db
12
 */
13
final class CheckConstraintTest extends TestCase
14
{
15
    public function testGetExpression(): void
16
    {
17
        $checkConstraint = new CheckConstraint();
18
19
        $this->assertSame('', $checkConstraint->getExpression());
20
21
        $checkConstraint = $checkConstraint->expression('expression');
22
23
        $this->assertSame('expression', $checkConstraint->getExpression());
24
    }
25
}
26