Code Duplication    Length = 15-15 lines in 2 locations

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

@@ 652-666 (lines=15) @@
649
    /**
650
     * Test that column names are properly escaped when creating Foreign Keys
651
     */
652
    public function testForignKeysArePropertlyEscaped()
653
    {
654
        $userId = 'user';
655
        $sessionId = 'session';
656
657
        $local = new \Phinx\Db\Table('users', array('primary_key' => $userId, 'id' => $userId), $this->adapter);
658
        $local->create();
659
660
        $foreign = new \Phinx\Db\Table('sessions', array('primary_key' => $sessionId, 'id' => $sessionId), $this->adapter);
661
        $foreign->addColumn('user', 'integer')
662
                ->addForeignKey('user', 'users', $userId)
663
                ->create();
664
665
        $this->assertTrue($foreign->hasForeignKey('user'));
666
    }
667
668
    public function testInsertData()
669
    {

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

@@ 832-846 (lines=15) @@
829
    /**
830
     * Test that column names are properly escaped when creating Foreign Keys
831
     */
832
    public function testForignKeysArePropertlyEscaped()
833
    {
834
        $userId = 'user';
835
        $sessionId = 'session';
836
837
        $local = new \Phinx\Db\Table('users', array('primary_key' => $userId, 'id' => $userId), $this->adapter);
838
        $local->create();
839
840
        $foreign = new \Phinx\Db\Table('sessions', array('primary_key' => $sessionId, 'id' => $sessionId), $this->adapter);
841
        $foreign->addColumn('user', 'integer')
842
                ->addForeignKey('user', 'users', $userId)
843
                ->create();
844
845
        $this->assertTrue($foreign->hasForeignKey('user'));
846
    }
847
848
    public function testTimestampWithTimezone()
849
    {