Code Duplication    Length = 23-23 lines in 2 locations

Tests/Unit/Repository/RepositoryTest.php 2 locations

@@ 160-182 (lines=23) @@
157
158
    }
159
160
    public function testDeleteOne()
161
    {
162
        $datas = [
163
            [
164
                "name" => "foo",
165
                "value" => 1
166
            ],
167
            [
168
                "name" => "bar",
169
                "value" => 2
170
            ],
171
            [
172
                "name" => "foo",
173
                "value" => 3
174
            ]
175
        ];
176
177
        $this->repository->insertMany($datas);
178
        $this->assertEquals(2, $this->repository->count(['name' => 'foo']));
179
180
        $this->repository->deleteOne(['name' => 'foo']);
181
        $this->assertEquals(1, $this->repository->count(['name' => 'foo']));
182
    }
183
184
    public function testDeleteMany()
185
    {
@@ 184-206 (lines=23) @@
181
        $this->assertEquals(1, $this->repository->count(['name' => 'foo']));
182
    }
183
184
    public function testDeleteMany()
185
    {
186
        $datas = [
187
            [
188
                "name" => "foo",
189
                "value" => 1
190
            ],
191
            [
192
                "name" => "bar",
193
                "value" => 2
194
            ],
195
            [
196
                "name" => "foo",
197
                "value" => 3
198
            ]
199
        ];
200
201
        $this->repository->insertMany($datas);
202
        $this->assertEquals(2, $this->repository->count(['name' => 'foo']));
203
204
        $this->repository->deletemany(['name' => 'foo']);
205
        $this->assertEquals(0, $this->repository->count(['name' => 'foo']));
206
    }
207
208
    public function testAggregate()
209
    {