MariaDb1027PlatformTest.php 1.55 KB
Newer Older
1 2 3 4
<?php

namespace Doctrine\Tests\DBAL\Platforms;

5
use Doctrine\DBAL\Platforms\MariaDb1027Platform;
6 7 8 9
use Doctrine\DBAL\Schema\Comparator;
use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Types\Type;

10
class MariaDb1027PlatformTest extends AbstractMySQLPlatformTestCase
11 12 13 14
{
    /**
     * {@inheritdoc}
     */
15
    public function createPlatform() : MariaDb1027Platform
16
    {
17
        return new MariaDb1027Platform();
18 19
    }

20
    public function testHasNativeJsonType() : void
21
    {
22
        self::assertFalse($this->_platform->hasNativeJsonType());
23 24
    }

25 26 27 28
    /**
     * From MariaDB 10.2.7, JSON type is an alias to LONGTEXT
     * @link https://mariadb.com/kb/en/library/json-data-type/
     */
29
    public function testReturnsJsonTypeDeclarationSQL() : void
30
    {
31
        self::assertSame('LONGTEXT', $this->_platform->getJsonTypeDeclarationSQL([]));
32 33
    }

34
    public function testInitializesJsonTypeMapping() : void
35 36 37 38 39 40 41 42 43 44 45
    {
        self::assertTrue($this->_platform->hasDoctrineTypeMappingFor('json'));
        self::assertSame(Type::JSON, $this->_platform->getDoctrineTypeMapping('json'));
    }

    /**
     * Overrides and skips AbstractMySQLPlatformTestCase test regarding propagation
     * of unsupported default values for Blob and Text columns.
     *
     * @see AbstractMySQLPlatformTestCase::testDoesNotPropagateDefaultValuesForUnsupportedColumnTypes()
     */
46
    public function testDoesNotPropagateDefaultValuesForUnsupportedColumnTypes() : void
47 48 49 50
    {
        $this->markTestSkipped('MariaDB102Platform support propagation of default values for BLOB and TEXT columns');
    }
}