Code Duplication    Length = 16-20 lines in 2 locations

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

@@ 25-44 (lines=20) @@
22
        self::assertFalse($this->_platform->prefersSequences());
23
    }
24
25
    public function testGeneratesSequenceSqlCommands()
26
    {
27
        $sequence = new Sequence('myseq', 20, 1);
28
        self::assertEquals(
29
            'CREATE SEQUENCE myseq START WITH 1 INCREMENT BY 20 MINVALUE 1',
30
            $this->_platform->getCreateSequenceSQL($sequence)
31
        );
32
        self::assertEquals(
33
            'ALTER SEQUENCE myseq INCREMENT BY 20',
34
            $this->_platform->getAlterSequenceSQL($sequence)
35
        );
36
        self::assertEquals(
37
            'DROP SEQUENCE myseq',
38
            $this->_platform->getDropSequenceSQL('myseq')
39
        );
40
        self::assertEquals(
41
            "SELECT NEXT VALUE FOR myseq",
42
            $this->_platform->getSequenceNextValSQL('myseq')
43
        );
44
    }
45
46
47
    public function testModifyLimitQuery()

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

@@ 245-260 (lines=16) @@
242
        return 'CREATE UNIQUE INDEX index_name ON test (test, test2)';
243
    }
244
245
    public function testGeneratesSequenceSqlCommands()
246
    {
247
        $sequence = new \Doctrine\DBAL\Schema\Sequence('myseq', 20, 1);
248
        self::assertEquals(
249
            'CREATE SEQUENCE myseq INCREMENT BY 20 MINVALUE 1 START 1',
250
            $this->_platform->getCreateSequenceSQL($sequence)
251
        );
252
        self::assertEquals(
253
            'DROP SEQUENCE myseq CASCADE',
254
            $this->_platform->getDropSequenceSQL('myseq')
255
        );
256
        self::assertEquals(
257
            "SELECT NEXTVAL('myseq')",
258
            $this->_platform->getSequenceNextValSQL('myseq')
259
        );
260
    }
261
262
    public function testDoesNotPreferIdentityColumns()
263
    {