Code Duplication    Length = 14-14 lines in 2 locations

tests/Doctrine/Tests/DBAL/Schema/IndexTest.php 2 locations

@@ 88-101 (lines=14) @@
85
        $this->assertTrue($idx2->isFullfilledBy($idx1));
86
    }
87
88
    public function testFulfilledWithPartial()
89
    {
90
        $without = new Index('without', array('col1', 'col2'), true, false, array(), array());
91
        $partial = new Index('partial', array('col1', 'col2'), true, false, array(), array('where' => 'col1 IS NULL'));
92
        $another = new Index('another', array('col1', 'col2'), true, false, array(), array('where' => 'col1 IS NULL'));
93
94
        $this->assertFalse($partial->isFullfilledBy($without));
95
        $this->assertFalse($without->isFullfilledBy($partial));
96
97
        $this->assertTrue($partial->isFullfilledBy($partial));
98
99
        $this->assertTrue($partial->isFullfilledBy($another));
100
        $this->assertTrue($another->isFullfilledBy($partial));
101
    }
102
103
    public function testOverrulesWithPartial()
104
    {
@@ 103-116 (lines=14) @@
100
        $this->assertTrue($another->isFullfilledBy($partial));
101
    }
102
103
    public function testOverrulesWithPartial()
104
    {
105
        $without = new Index('without', array('col1', 'col2'), true, false, array(), array());
106
        $partial = new Index('partial', array('col1', 'col2'), true, false, array(), array('where' => 'col1 IS NULL'));
107
        $another = new Index('another', array('col1', 'col2'), true, false, array(), array('where' => 'col1 IS NULL'));
108
109
        $this->assertFalse($partial->overrules($without));
110
        $this->assertFalse($without->overrules($partial));
111
112
        $this->assertTrue($partial->overrules($partial));
113
114
        $this->assertTrue($partial->overrules($another));
115
        $this->assertTrue($another->overrules($partial));
116
    }
117
118
    /**
119
     * @group DBAL-220