Passed
Pull Request — master (#380)
by Wilmer
06:00 queued 02:33
created

AbstractQuoterTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
dl 0
loc 18
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testsEnsureColumnName() 0 3 1
A testsEnsureNameQuoted() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Db\Tests;
6
7
use PHPUnit\Framework\TestCase;
8
use Yiisoft\Db\Tests\Support\TestTrait;
9
10
abstract class AbstractQuoterTest extends TestCase
11
{
12
    use TestTrait;
13
14
    /**
15
     * @dataProvider \Yiisoft\Db\Tests\Provider\QuoterProvider::ensureColumnName()
16
     */
17
    public function testsEnsureColumnName(string $columnName, string $expected): void
18
    {
19
        $this->assertSame($expected, $this->getQuoter()->ensureColumnName($columnName));
20
    }
21
22
    /**
23
     * @dataProvider \Yiisoft\Db\Tests\Provider\QuoterProvider::ensureNameQuoted()
24
     */
25
    public function testsEnsureNameQuoted(string $name, string $expected): void
26
    {
27
        $this->assertSame($expected, $this->getQuoter()->ensureNameQuoted($name));
28
    }
29
}
30