DBAL510Test.php 926 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
<?php

namespace Doctrine\Tests\DBAL\Functional\Ticket;

use Doctrine\DBAL\Schema\Comparator;
use Doctrine\DBAL\Schema\Table;

/**
 * @group DBAL-510
 */
class DBAL510Test extends \Doctrine\Tests\DbalFunctionalTestCase
{
13
    protected function setUp()
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
    {
        parent::setUp();

        if ($this->_conn->getDatabasePlatform()->getName() !== "postgresql") {
            $this->markTestSkipped('PostgreSQL Only test');
        }
    }

    public function testSearchPathSchemaChanges()
    {
        $table = new Table("dbal510tbl");
        $table->addColumn('id', 'integer');
        $table->setPrimaryKey(array('id'));

        $this->_conn->getSchemaManager()->createTable($table);

        $onlineTable = $this->_conn->getSchemaManager()->listTableDetails('dbal510tbl');

        $comparator = new Comparator();
        $diff = $comparator->diffTable($onlineTable, $table);

35
        self::assertFalse($diff);
36 37
    }
}