SQLAzurePlatformTest.php 818 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
<?php

namespace Doctrine\Tests\DBAL\Platforms;

use Doctrine\Tests\DbalTestCase;

/**
 * @group DBAL-222
 */
class SQLAzurePlatformTest extends DbalTestCase
{
Gabriel Caruso's avatar
Gabriel Caruso committed
12 13 14
    /**
     * @var \Doctrine\DBAL\Platforms\SQLAzurePlatform
     */
15 16
    private $platform;

17
    protected function setUp()
18 19 20 21 22 23 24 25 26 27 28
    {
        $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');

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