Code Duplication    Length = 12-12 lines in 3 locations

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

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