Failed Conditions
Pull Request — master (#3512)
by David
16:57
created

testGetCreateTableSQLWithColumnCollation()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

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