Completed
Pull Request — master (#3512)
by David
16:25
created

testGetCreateTableSQLWithColumnCollation()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 12
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Doctrine\Tests\DBAL\Platforms;
4
5
use Doctrine\DBAL\Platforms\PostgreSqlPlatform;
6
use Doctrine\DBAL\Schema\Table;
7
8
class PostgreSqlPlatformTest extends AbstractPostgreSqlPlatformTestCase
9
{
10
    public function createPlatform()
11
    {
12
        return new PostgreSqlPlatform();
13
    }
14
15
    public function testSupportsPartialIndexes()
16
    {
17
        self::assertTrue($this->platform->supportsPartialIndexes());
18
    }
19
20
    public function testGetCreateTableSQLWithColumnCollation() : void
21
    {
22
        $table = new Table('foo');
23
        $table->addColumn('id', 'string');
24
        $table->addOption('comment', 'foo');
25
        self::assertSame(
26
            [
27
                'CREATE TABLE foo (id VARCHAR(255) NOT NULL)',
28
                "COMMENT ON TABLE foo IS 'foo'",
29
            ],
30
            $this->platform->getCreateTableSQL($table),
31
            'Comments are added to table.'
32
        );
33
    }
34
}
35