Completed
Pull Request — develop (#3533)
by
unknown
16:31 queued 01:26
created

testInheritsMariaDb1027Platform()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Tests\DBAL\Platforms;
6
7
use Doctrine\DBAL\Platforms\MariaDb1027Platform;
8
use Doctrine\DBAL\Platforms\MariaDb1043Platform;
9
10
class MariaDb1043PlatformTest extends AbstractMySQLPlatformTestCase
11
{
12
    /**
13
     * {@inheritdoc}
14
     */
15
    public function createPlatform() : MariaDb1043Platform
16
    {
17
        return new MariaDb1043Platform();
18
    }
19
20
    public function testInheritsMariaDb1027Platform() : void
21
    {
22
        self::assertInstanceOf(MariaDb1027Platform::class, $this->platform);
23
    }
24
25
    public function testHasNativeJsonType() : void
26
    {
27
        self::assertTrue($this->platform->hasNativeJsonType());
28
    }
29
30
    /**
31
     * From MariaDB 10.4.3, the JSON_VALID function is automatically used as a CHECK constraint for the JSON data type
32
     * alias in order to ensure that a valid json document is inserted.
33
     *
34
     * @link https://mariadb.com/kb/en/library/json-data-type/
35
     */
36
    public function testReturnsJsonTypeDeclarationSQL() : void
37
    {
38
        self::assertSame('JSON', $this->platform->getJsonTypeDeclarationSQL([]));
39
    }
40
41
    /**
42
     * Overrides and skips AbstractMySQLPlatformTestCase test regarding propagation
43
     * of unsupported default values for Blob and Text columns.
44
     *
45
     * @see AbstractMySQLPlatformTestCase::testDoesNotPropagateDefaultValuesForUnsupportedColumnTypes()
46
     */
47
    public function testDoesNotPropagateDefaultValuesForUnsupportedColumnTypes() : void
48
    {
49
        $this->markTestSkipped('MariaDB104Platform support propagation of default values for BLOB and TEXT columns');
50
    }
51
}
52