Code Duplication    Length = 8-11 lines in 2 locations

eZ/Publish/Core/Repository/Tests/Service/Mock/ContentTest.php 2 locations

@@ 878-885 (lines=8) @@
875
     *
876
     * @covers \eZ\Publish\Core\Repository\ContentService::createContent
877
     */
878
    public function testCreateContentThrowsInvalidArgumentExceptionMainLanguageCodeNotSet()
879
    {
880
        $this->expectException(\eZ\Publish\API\Repository\Exceptions\InvalidArgumentException::class);
881
        $this->expectExceptionMessage('Argument \'$contentCreateStruct\' is invalid: \'mainLanguageCode\' property must be set');
882
883
        $mockedService = $this->getPartlyMockedContentService();
884
        $mockedService->createContent(new ContentCreateStruct(), array());
885
    }
886
887
    /**
888
     * Test for the createContent() method.
@@ 892-902 (lines=11) @@
889
     *
890
     * @covers \eZ\Publish\Core\Repository\ContentService::createContent
891
     */
892
    public function testCreateContentThrowsInvalidArgumentExceptionContentTypeNotSet()
893
    {
894
        $this->expectException(\eZ\Publish\API\Repository\Exceptions\InvalidArgumentException::class);
895
        $this->expectExceptionMessage('Argument \'$contentCreateStruct\' is invalid: \'contentType\' property must be set');
896
897
        $mockedService = $this->getPartlyMockedContentService();
898
        $mockedService->createContent(
899
            new ContentCreateStruct(array('mainLanguageCode' => 'eng-US')),
900
            array()
901
        );
902
    }
903
904
    /**
905
     * Test for the createContent() method.