Db2SchemaManagerTest.php 917 Bytes
Newer Older
1 2 3 4
<?php

namespace Doctrine\Tests\DBAL\Functional\Schema;

5 6
use Doctrine\DBAL\Schema\Table;

7 8
class Db2SchemaManagerTest extends SchemaManagerFunctionalTestCase
{
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
    /**
     * @group DBAL-939
     */
    public function testGetBooleanColumn()
    {
        $table = new Table('boolean_column_test');
        $table->addColumn('bool', 'boolean');
        $table->addColumn('bool_commented', 'boolean', array('comment' => "That's a comment"));

        $this->_sm->createTable($table);

        $columns = $this->_sm->listTableColumns('boolean_column_test');

        $this->assertInstanceOf('Doctrine\DBAL\Types\BooleanType', $columns['bool']->getType());
        $this->assertInstanceOf('Doctrine\DBAL\Types\BooleanType', $columns['bool_commented']->getType());
24

25 26 27
        $this->assertNull($columns['bool']->getComment());
        $this->assertSame("That's a comment", $columns['bool_commented']->getComment());
    }
Endre Fejes's avatar
Endre Fejes committed
28
}