Code Duplication    Length = 8-11 lines in 2 locations

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

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