Code Duplication    Length = 10-11 lines in 2 locations

eZ/Publish/API/Repository/Tests/ContentServiceTest.php 1 location

@@ 602-611 (lines=10) @@
599
     * @see \eZ\Publish\API\Repository\ContentService::loadContentInfoList()
600
     * @depends testLoadContentInfoList
601
     */
602
    public function testLoadContentInfoListSkipsNotFoundItems()
603
    {
604
        $repository = $this->getRepository();
605
606
        $nonExistentContentId = $this->generateId('object', self::DB_INT_MAX);
607
        $contentService = $repository->getContentService();
608
        $list = $contentService->loadContentInfoList([$nonExistentContentId]);
609
610
        $this->assertCount(0, $list);
611
    }
612
613
    /**
614
     * Test for the loadContentInfoByRemoteId() method.

eZ/Publish/API/Repository/Tests/ContentServiceAuthorizationTest.php 1 location

@@ 154-164 (lines=11) @@
151
     * @see \eZ\Publish\API\Repository\ContentService::loadContentInfoList()
152
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContentInfoList
153
     */
154
    public function testLoadContentInfoListSkipsUnauthorizedItems()
155
    {
156
        $repository = $this->getRepository();
157
        $contentId = $this->generateId('object', 10);
158
        $contentService = $repository->getContentService();
159
        $repository->setCurrentUser($this->createAnonymousWithEditorRole());
160
161
        $list = $contentService->loadContentInfoList([$contentId]);
162
163
        $this->assertCount(0, $list);
164
    }
165
166
    /**
167
     * Test for the loadContentInfoByRemoteId() method.