Completed
Pull Request — master (#3499)
by David
18:49
created

Db2SchemaManagerTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 12
dl 0
loc 30
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetBooleanColumn() 0 15 1
A testListTableWithBinary() 0 3 1
A testCommentInTable() 0 3 1
1
<?php
2
3
namespace Doctrine\Tests\DBAL\Functional\Schema;
4
5
use Doctrine\DBAL\Schema\Table;
6
use Doctrine\DBAL\Types\BooleanType;
7
8
class Db2SchemaManagerTest extends SchemaManagerFunctionalTestCase
9
{
10
    /**
11
     * @group DBAL-939
12
     */
13
    public function testGetBooleanColumn()
14
    {
15
        $table = new Table('boolean_column_test');
16
        $table->addColumn('bool', 'boolean');
17
        $table->addColumn('bool_commented', 'boolean', ['comment' => "That's a comment"]);
18
19
        $this->schemaManager->createTable($table);
20
21
        $columns = $this->schemaManager->listTableColumns('boolean_column_test');
22
23
        self::assertInstanceOf(BooleanType::class, $columns['bool']->getType());
24
        self::assertInstanceOf(BooleanType::class, $columns['bool_commented']->getType());
25
26
        self::assertNull($columns['bool']->getComment());
27
        self::assertSame("That's a comment", $columns['bool_commented']->getComment());
28
    }
29
30
    public function testListTableWithBinary()
31
    {
32
        self::markTestSkipped('Binary data type is currently not supported on DB2 LUW');
33
    }
34
35
    public function testCommentInTable() : void
36
    {
37
        self::markTestSkipped('Table level comments are not supported on DB2');
38
    }
39
}
40