Code Duplication    Length = 13-15 lines in 2 locations

tests/Doctrine/Tests/DBAL/Schema/SchemaTest.php 1 location

@@ 178-190 (lines=13) @@
175
        $schema = new Schema([], [$sequence, $sequence]);
176
    }
177
178
    public function testConfigMaxIdentifierLength() : void
179
    {
180
        $schemaConfig = new SchemaConfig();
181
        $schemaConfig->setMaxIdentifierLength(5);
182
183
        $schema = new Schema([], [], $schemaConfig);
184
        $table  = $schema->createTable('smalltable');
185
        $table->addColumn('long_id', 'integer');
186
        $table->addIndex(['long_id']);
187
188
        $index = current($table->getIndexes());
189
        self::assertEquals(5, strlen($index->getName()));
190
    }
191
192
    public function testDeepClone() : void
193
    {

tests/Doctrine/Tests/DBAL/Schema/Visitor/RemoveNamespacedAssetsTest.php 1 location

@@ 19-33 (lines=15) @@
16
    /**
17
     * @group DBAL-204
18
     */
19
    public function testRemoveNamespacedAssets() : void
20
    {
21
        $config = new SchemaConfig();
22
        $config->setName('test');
23
        $schema = new Schema([], [], $config);
24
25
        $schema->createTable('test.test');
26
        $schema->createTable('foo.bar');
27
        $schema->createTable('baz');
28
29
        $schema->visit(new RemoveNamespacedAssets());
30
31
        $tables = $schema->getTables();
32
        self::assertEquals(['test.test', 'test.baz'], array_keys($tables), "Only 2 tables should be present, both in 'test' namespace.");
33
    }
34
35
    /**
36
     * @group DBAL-204