SQLAzurePlatformTest.php 747 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
<?php

namespace Doctrine\Tests\DBAL\Platforms;

use Doctrine\Tests\DbalTestCase;

/**
 * @group DBAL-222
 */
class SQLAzurePlatformTest extends DbalTestCase
{
    private $platform;

    public function setUp()
    {
        $this->platform = new \Doctrine\DBAL\Platforms\SQLAzurePlatform();
    }

    public function testCreateFederatedOnTable()
    {
        $table = new \Doctrine\DBAL\Schema\Table("tbl");
        $table->addColumn("id", "integer");
        $table->addOption('azure.federatedOnDistributionName', 'TblId');
        $table->addOption('azure.federatedOnColumnName', 'id');

        $this->assertEquals(array('CREATE TABLE tbl (id INT NOT NULL) FEDERATED ON (TblId = id)'), $this->platform->getCreateTableSQL($table));
    }
}