PostgreSQL94PlatformTest.php 948 Bytes
Newer Older
1 2 3 4 5
<?php

namespace Doctrine\Tests\DBAL\Platforms;

use Doctrine\DBAL\Platforms\PostgreSQL94Platform;
6
use Doctrine\DBAL\Types\Type;
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

class PostgreSQL94PlatformTest extends PostgreSQL92PlatformTest
{
    /**
     * {@inheritdoc}
     */
    public function createPlatform()
    {
        return new PostgreSQL94Platform();
    }

    public function testReturnsJsonTypeDeclarationSQL()
    {
        parent::testReturnsJsonTypeDeclarationSQL();
        $this->assertSame('JSON', $this->_platform->getJsonTypeDeclarationSQL(array('jsonb' => false)));
        $this->assertSame('JSONB', $this->_platform->getJsonTypeDeclarationSQL(array('jsonb' => true)));
    }

    public function testInitializesJsonTypeMapping()
    {
        parent::testInitializesJsonTypeMapping();
        $this->assertTrue($this->_platform->hasDoctrineTypeMappingFor('jsonb'));
29
        $this->assertEquals(Type::JSON, $this->_platform->getDoctrineTypeMapping('jsonb'));
30 31
    }
}