Code Duplication    Length = 19-19 lines in 4 locations

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

@@ 103-121 (lines=19) @@
100
        ));
101
    }
102
103
    public function testGeneratesTypeDeclarationForStrings()
104
    {
105
        self::assertEquals(
106
            'CHAR(10)',
107
            $this->_platform->getVarcharTypeDeclarationSQL(
108
                array('length' => 10, 'fixed' => true)
109
        ));
110
        self::assertEquals(
111
            'VARCHAR(50)',
112
            $this->_platform->getVarcharTypeDeclarationSQL(array('length' => 50)),
113
            'Variable string declaration is not correct'
114
        );
115
        self::assertEquals(
116
            'VARCHAR(255)',
117
            $this->_platform->getVarcharTypeDeclarationSQL(array()),
118
            'Long string declaration is not correct'
119
        );
120
    }
121
122
    public function testPrefersIdentityColumns()
123
    {
124
        self::assertTrue($this->_platform->prefersIdentityColumns());

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

@@ 164-182 (lines=19) @@
161
        ));
162
    }
163
164
    public function testGeneratesTypeDeclarationForStrings()
165
    {
166
        self::assertEquals(
167
            'CHAR(10)',
168
            $this->_platform->getVarcharTypeDeclarationSQL(
169
                array('length' => 10, 'fixed' => true))
170
        );
171
        self::assertEquals(
172
            'VARCHAR(50)',
173
            $this->_platform->getVarcharTypeDeclarationSQL(array('length' => 50)),
174
            'Variable string declaration is not correct'
175
        );
176
        self::assertEquals(
177
            'VARCHAR(255)',
178
            $this->_platform->getVarcharTypeDeclarationSQL(array()),
179
            'Long string declaration is not correct'
180
        );
181
    }
182
183
    public function getGenerateUniqueIndexSql()
184
    {
185
        return 'CREATE UNIQUE INDEX index_name ON test (test, test2)';

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

@@ 160-178 (lines=19) @@
157
            ));
158
    }
159
160
    public function testGeneratesTypeDeclarationsForStrings()
161
    {
162
        self::assertEquals(
163
            'CHAR(10)',
164
            $this->_platform->getVarcharTypeDeclarationSQL(
165
                array('length' => 10, 'fixed' => true)
166
            ));
167
        self::assertEquals(
168
            'VARCHAR2(50)',
169
            $this->_platform->getVarcharTypeDeclarationSQL(array('length' => 50)),
170
            'Variable string declaration is not correct'
171
        );
172
        self::assertEquals(
173
            'VARCHAR2(255)',
174
            $this->_platform->getVarcharTypeDeclarationSQL(array()),
175
            'Long string declaration is not correct'
176
        );
177
    }
178
179
    public function testPrefersIdentityColumns()
180
    {
181
        self::assertFalse($this->_platform->prefersIdentityColumns());

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

@@ 229-247 (lines=19) @@
226
        );
227
    }
228
229
    public function testGeneratesTypeDeclarationForStrings()
230
    {
231
        self::assertEquals(
232
            'CHAR(10)',
233
            $this->_platform->getVarcharTypeDeclarationSQL(
234
                array('length' => 10, 'fixed' => true))
235
        );
236
        self::assertEquals(
237
            'VARCHAR(50)',
238
            $this->_platform->getVarcharTypeDeclarationSQL(array('length' => 50)),
239
            'Variable string declaration is not correct'
240
        );
241
        self::assertEquals(
242
            'VARCHAR(255)',
243
            $this->_platform->getVarcharTypeDeclarationSQL(array()),
244
            'Long string declaration is not correct'
245
        );
246
    }
247
248
    public function getGenerateIndexSql()
249
    {
250
        return 'CREATE INDEX my_idx ON mytable (user_name, last_login)';