Code Duplication    Length = 12-12 lines in 3 locations

eZ/Publish/API/Repository/Tests/ContentServiceTest.php 3 locations

@@ 500-511 (lines=12) @@
497
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
498
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContentInfo
499
     */
500
    public function testLoadContentInfoThrowsNotFoundException()
501
    {
502
        $repository = $this->getRepository();
503
504
        $nonExistentContentId = $this->generateId('object', self::DB_INT_MAX);
505
        /* BEGIN: Use Case */
506
        $contentService = $repository->getContentService();
507
508
        // This call will fail with a NotFoundException
509
        $contentService->loadContentInfo($nonExistentContentId);
510
        /* END: Use Case */
511
    }
512
513
    /**
514
     * Test for the loadContentInfoByRemoteId() method.
@@ 613-624 (lines=12) @@
610
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
611
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadVersionInfoById
612
     */
613
    public function testLoadVersionInfoByIdThrowsNotFoundException()
614
    {
615
        $repository = $this->getRepository();
616
617
        $nonExistentContentId = $this->generateId('object', self::DB_INT_MAX);
618
        /* BEGIN: Use Case */
619
        $contentService = $repository->getContentService();
620
621
        // This call will fail with a "NotFoundException"
622
        $contentService->loadVersionInfoById($nonExistentContentId);
623
        /* END: Use Case */
624
    }
625
626
    /**
627
     * Test for the loadContentByContentInfo() method.
@@ 721-732 (lines=12) @@
718
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
719
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContent
720
     */
721
    public function testLoadContentThrowsNotFoundException()
722
    {
723
        $repository = $this->getRepository();
724
725
        $nonExistentContentId = $this->generateId('object', self::DB_INT_MAX);
726
        /* BEGIN: Use Case */
727
        $contentService = $repository->getContentService();
728
729
        // This call will fail with a "NotFoundException"
730
        $contentService->loadContent($nonExistentContentId);
731
        /* END: Use Case */
732
    }
733
734
    /**
735
     * Test for the loadContentByRemoteId() method.