Code Duplication    Length = 10-10 lines in 2 locations

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

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