Code Duplication    Length = 8-11 lines in 2 locations

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

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