Code Duplication    Length = 8-10 lines in 2 locations

oldtests/BasicFeaturesTest.php 2 locations

@@ 210-217 (lines=8) @@
207
        $this->assertTrue($product->_exist);
208
    }
209
210
    public function testFirst()
211
    {
212
        $product = Product::first();
213
        $this->assertInstanceOf(Product::class, $product);
214
        $this->assertEquals(1, $product->getId());
215
        $this->assertEquals(0, $product->_position);
216
        $this->assertTrue($product->_exist);
217
    }
218
219
    public function testAll()
220
    {
@@ 226-235 (lines=10) @@
223
        $this->assertEquals(1, $products->count());
224
    }
225
226
    public function testMap()
227
    {
228
        $total = Product::map([], function (Product $product) {
229
            $this->assertInstanceOf(Product::class, $product);
230
            $this->assertEquals(1, $product->getId());
231
            $this->assertEquals(0, $product->_position);
232
            $this->assertTrue($product->_exist);
233
        });
234
        $this->assertEquals(1, $total);
235
    }
236
237
    public function testCreate()
238
    {