Code Duplication    Length = 10-10 lines in 2 locations

tests/Doctrine/Tests/ORM/PersistentCollectionTest.php 2 locations

@@ 112-121 (lines=10) @@
109
    /**
110
     * @group 6110
111
     */
112
    public function testRemovingElementsAlsoRemovesKeys()
113
    {
114
        $dummy = new \stdClass();
115
116
        $this->collection->add($dummy);
117
        $this->assertEquals([0], array_keys($this->collection->toArray()));
118
119
        $this->collection->removeElement($dummy);
120
        $this->assertEquals([], array_keys($this->collection->toArray()));
121
    }
122
123
    /**
124
     * @group 6110
@@ 136-145 (lines=10) @@
133
    /**
134
     * @group 6110
135
     */
136
    public function testClearWillAlsoResetKeyPositions()
137
    {
138
        $dummy = new \stdClass();
139
140
        $this->collection->add($dummy);
141
        $this->collection->removeElement($dummy);
142
        $this->collection->clear();
143
        $this->collection->add($dummy);
144
        $this->assertEquals([0], array_keys($this->collection->toArray()));
145
    }
146
147
    /**
148
     * @group 6613