Code Duplication    Length = 19-20 lines in 4 locations

tests/Doctrine/Tests/DBAL/Platforms/AbstractMySQLPlatformTestCase.php 1 location

@@ 66-85 (lines=20) @@
63
        self::assertEquals('CONCAT(column1, column2, column3)', $this->platform->getConcatExpression('column1', 'column2', 'column3'), 'Concatenation function is not correct');
64
    }
65
66
    public function testGeneratesTransactionsCommands() : void
67
    {
68
        self::assertEquals(
69
            'SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED',
70
            $this->platform->getSetTransactionIsolationSQL(TransactionIsolationLevel::READ_UNCOMMITTED),
71
            ''
72
        );
73
        self::assertEquals(
74
            'SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED',
75
            $this->platform->getSetTransactionIsolationSQL(TransactionIsolationLevel::READ_COMMITTED)
76
        );
77
        self::assertEquals(
78
            'SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ',
79
            $this->platform->getSetTransactionIsolationSQL(TransactionIsolationLevel::REPEATABLE_READ)
80
        );
81
        self::assertEquals(
82
            'SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE',
83
            $this->platform->getSetTransactionIsolationSQL(TransactionIsolationLevel::SERIALIZABLE)
84
        );
85
    }
86
87
    public function testGeneratesDDLSnippets() : void
88
    {

tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php 1 location

@@ 154-172 (lines=19) @@
151
        self::assertEquals('SUBSTRING(column FROM 1 FOR 5)', $this->platform->getSubstringExpression('column', '1', '5'), 'Substring expression with length is not correct');
152
    }
153
154
    public function testGeneratesTransactionCommands() : void
155
    {
156
        self::assertEquals(
157
            'SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL READ UNCOMMITTED',
158
            $this->platform->getSetTransactionIsolationSQL(TransactionIsolationLevel::READ_UNCOMMITTED)
159
        );
160
        self::assertEquals(
161
            'SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL READ COMMITTED',
162
            $this->platform->getSetTransactionIsolationSQL(TransactionIsolationLevel::READ_COMMITTED)
163
        );
164
        self::assertEquals(
165
            'SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL REPEATABLE READ',
166
            $this->platform->getSetTransactionIsolationSQL(TransactionIsolationLevel::REPEATABLE_READ)
167
        );
168
        self::assertEquals(
169
            'SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL SERIALIZABLE',
170
            $this->platform->getSetTransactionIsolationSQL(TransactionIsolationLevel::SERIALIZABLE)
171
        );
172
    }
173
174
    public function testGeneratesDDLSnippets() : void
175
    {

tests/Doctrine/Tests/DBAL/Platforms/AbstractSQLServerPlatformTestCase.php 1 location

@@ 77-95 (lines=19) @@
74
        self::assertEquals('(column1 + column2 + column3)', $this->platform->getConcatExpression('column1', 'column2', 'column3'), 'Concatenation expression is not correct');
75
    }
76
77
    public function testGeneratesTransactionsCommands() : void
78
    {
79
        self::assertEquals(
80
            'SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED',
81
            $this->platform->getSetTransactionIsolationSQL(TransactionIsolationLevel::READ_UNCOMMITTED)
82
        );
83
        self::assertEquals(
84
            'SET TRANSACTION ISOLATION LEVEL READ COMMITTED',
85
            $this->platform->getSetTransactionIsolationSQL(TransactionIsolationLevel::READ_COMMITTED)
86
        );
87
        self::assertEquals(
88
            'SET TRANSACTION ISOLATION LEVEL REPEATABLE READ',
89
            $this->platform->getSetTransactionIsolationSQL(TransactionIsolationLevel::REPEATABLE_READ)
90
        );
91
        self::assertEquals(
92
            'SET TRANSACTION ISOLATION LEVEL SERIALIZABLE',
93
            $this->platform->getSetTransactionIsolationSQL(TransactionIsolationLevel::SERIALIZABLE)
94
        );
95
    }
96
97
    public function testGeneratesDDLSnippets() : void
98
    {

tests/Doctrine/Tests/DBAL/Platforms/SqlitePlatformTest.php 1 location

@@ 47-65 (lines=19) @@
44
        self::assertEquals('SUBSTR(column, 0, 5)', $this->platform->getSubstringExpression('column', '0', '5'), 'Substring expression with length is not correct');
45
    }
46
47
    public function testGeneratesTransactionCommands() : void
48
    {
49
        self::assertEquals(
50
            'PRAGMA read_uncommitted = 0',
51
            $this->platform->getSetTransactionIsolationSQL(TransactionIsolationLevel::READ_UNCOMMITTED)
52
        );
53
        self::assertEquals(
54
            'PRAGMA read_uncommitted = 1',
55
            $this->platform->getSetTransactionIsolationSQL(TransactionIsolationLevel::READ_COMMITTED)
56
        );
57
        self::assertEquals(
58
            'PRAGMA read_uncommitted = 1',
59
            $this->platform->getSetTransactionIsolationSQL(TransactionIsolationLevel::REPEATABLE_READ)
60
        );
61
        self::assertEquals(
62
            'PRAGMA read_uncommitted = 1',
63
            $this->platform->getSetTransactionIsolationSQL(TransactionIsolationLevel::SERIALIZABLE)
64
        );
65
    }
66
67
    public function testPrefersIdentityColumns() : void
68
    {