Code Duplication    Length = 7-9 lines in 2 locations

tests/OpenOrchestra/Tests/Functional/ModelBundle/Repository/ContentRepositoryTest.php 1 location

@@ 394-400 (lines=7) @@
391
     *
392
     * @dataProvider provideFindByHistoryAndSiteId
393
     */
394
    public function testFindByHistoryAndSiteId($user, $siteId, array $eventTypes, $published, $limit, $sort, $count)
395
    {
396
        $user = $this->userRepository->findOneByUsername($user);
397
398
        $contents = $this->repository->findByHistoryAndSiteId($user->getId(), $siteId, $eventTypes, $published, $limit, $sort);
399
        $this->assertCount($count, $contents);
400
    }
401
402
    /**
403
     * @return array

tests/OpenOrchestra/Tests/Functional/ModelBundle/Repository/NodeRepositoryTest.php 1 location

@@ 373-381 (lines=9) @@
370
     *
371
     * @dataProvider provideFindByHistoryAndSiteId
372
     */
373
    public function testFindByHistoryAndSiteId($user, $siteId, array $eventTypes, $published, $limit, $sort, $count)
374
    {
375
        $user = $this->userRepository->findOneByUsername($user);
376
377
        $this->assertCount(
378
            $count,
379
            $this->repository->findByHistoryAndSiteId($user->getId(), $siteId, $eventTypes, $published, $limit, $sort)
380
        );
381
    }
382
383
    /**
384
     * @return array