Passed
Push — master ( c5d372...0a085e )
by Alexander
01:31
created

ColumnSchemaBuilderTest::typesProvider()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

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