Code Duplication    Length = 12-12 lines in 3 locations

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

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