Completed
Pull Request — develop (#3533)
by
unknown
65:15
created

MariaDb1043PlatformTest   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 5
eloc 6
dl 0
loc 40
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A testDoesNotPropagateDefaultValuesForUnsupportedColumnTypes() 0 3 1
A testInheritsMariaDb1027Platform() 0 3 1
A testHasNativeJsonType() 0 3 1
A createPlatform() 0 3 1
A testReturnsJsonTypeDeclarationSQL() 0 3 1
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