Passed
Push — master ( 2b1785...29418c )
by Alexander
03:20
created

ColumnSchemaBuilderTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Db\Mysql\Tests;
6
7
use Yiisoft\Db\Mysql\Schema\ColumnSchemaBuilder;
8
use Yiisoft\Db\Mysql\Schema\Schema;
9
use Yiisoft\Db\Tests\ColumnSchemaBuilderTest as AbstractColumnSchemaBuilderTest;
10
11
class ColumnSchemaBuilderTest extends AbstractColumnSchemaBuilderTest
12
{
13
    protected ?string $driverName = 'mysql';
14
15
    public function getColumnSchemaBuilder($type, $length = null): ColumnSchemaBuilder
16
    {
17
        return new ColumnSchemaBuilder($type, $length, $this->getConnection());
18
    }
19
20
    public function typesProvider(): array
21
    {
22
        return [
23
            ['integer UNSIGNED', Schema::TYPE_INTEGER, null, [
24
                ['unsigned'],
25
            ]],
26
            ['integer(10) UNSIGNED', Schema::TYPE_INTEGER, 10, [
27
                ['unsigned'],
28
            ]],
29
            ['integer(10) COMMENT \'test\'', Schema::TYPE_INTEGER, 10, [
30
                ['comment', 'test'],
31
            ]],
32
        ];
33
    }
34
}
35