Code Duplication    Length = 25-25 lines in 2 locations

vendor/robmorgan/phinx/tests/Phinx/Db/Adapter/SQLiteAdapterTest.php 1 location

@@ 350-374 (lines=25) @@
347
        $this->assertFalse($this->adapter->hasColumn('t', 'column1'));
348
    }
349
350
    public function testGetColumns()
351
    {
352
        $table = new \Phinx\Db\Table('t', array(), $this->adapter);
353
        $table->addColumn('column1', 'string')
354
              ->addColumn('column2', 'integer')
355
              ->addColumn('column3', 'biginteger')
356
              ->addColumn('column4', 'text')
357
              ->addColumn('column5', 'float')
358
              ->addColumn('column6', 'decimal')
359
              ->addColumn('column7', 'datetime')
360
              ->addColumn('column8', 'time')
361
              ->addColumn('column9', 'timestamp')
362
              ->addColumn('column10', 'date')
363
              ->addColumn('column11', 'binary')
364
              ->addColumn('column12', 'boolean')
365
              ->addColumn('column13', 'string', array('limit' => 10))
366
              ->addColumn('column15', 'integer', array('limit' => 10));
367
        $pendingColumns = $table->getPendingColumns();
368
        $table->save();
369
        $columns = $this->adapter->getColumns('t');
370
        $this->assertCount(count($pendingColumns) + 1, $columns);
371
        for ($i = 0; $i++; $i < count($pendingColumns)) {
372
            $this->assertEquals($pendingColumns[$i], $columns[$i+1]);
373
        }
374
    }
375
376
    public function testAddIndex()
377
    {

vendor/robmorgan/phinx/tests/Phinx/Db/Adapter/PostgresAdapterTest.php 1 location

@@ 464-488 (lines=25) @@
461
        $this->assertFalse($this->adapter->hasColumn('t', 'column1'));
462
    }
463
464
    public function testGetColumns()
465
    {
466
        $table = new \Phinx\Db\Table('t', array(), $this->adapter);
467
        $table->addColumn('column1', 'string')
468
              ->addColumn('column2', 'integer', array('limit' => PostgresAdapter::INT_SMALL))
469
              ->addColumn('column3', 'integer')
470
              ->addColumn('column4', 'biginteger')
471
              ->addColumn('column5', 'text')
472
              ->addColumn('column6', 'float')
473
              ->addColumn('column7', 'decimal')
474
              ->addColumn('column8', 'time')
475
              ->addColumn('column9', 'timestamp')
476
              ->addColumn('column10', 'date')
477
              ->addColumn('column11', 'boolean')
478
              ->addColumn('column12', 'datetime')
479
              ->addColumn('column13', 'binary')
480
              ->addColumn('column14', 'string', array('limit' => 10));
481
        $pendingColumns = $table->getPendingColumns();
482
        $table->save();
483
        $columns = $this->adapter->getColumns('t');
484
        $this->assertCount(count($pendingColumns) + 1, $columns);
485
        for ($i = 0; $i++; $i < count($pendingColumns)) {
486
            $this->assertEquals($pendingColumns[$i], $columns[$i+1]);
487
        }
488
    }
489
490
    public function testAddIndex()
491
    {